Repository navigation
feat(area-label): deterministic path sub-labels alongside the classified area #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CONTRACT: this is one of THIS repo's own path-filtered script tests, NOT a reusable | |
| # workflow. It is not callable and has no caller pattern: | |
| # TRIGGERS — `pull_request` and `push` to main, both filtered to scripts/area-label/** | |
| # and this file. A change elsewhere in the repo does not run it. | |
| # INPUTS — none. SECRETS — none. Read-only `contents: read`; the suite is hermetic and | |
| # makes no network call. | |
| # The reusable workflow these scripts back is .github/workflows/pr-area-label.yml. | |
| name: Test area-label scripts | |
| # Runs shellcheck + the hermetic suites for the area-label classifier (`tests/test_lib.sh` | |
| # over the pure core, `tests/test_apply.sh` over the label-writing orchestration with `gh` | |
| # and `curl` stubbed). The classifier | |
| # stamps an area label on every consuming repo's PRs, so a regression in taxonomy validation | |
| # or request-building silently mislabels PRs — cheap to guard with a unit run on change. | |
| on: | |
| pull_request: | |
| paths: | |
| - 'scripts/area-label/**' | |
| - '.github/workflows/test-area-label.yml' | |
| # pr-area-label.yml passes the scripts their whole input contract through env, so a | |
| # change to it can break the suite without touching a file under scripts/area-label/. | |
| - '.github/workflows/pr-area-label.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'scripts/area-label/**' | |
| - '.github/workflows/test-area-label.yml' | |
| - '.github/workflows/pr-area-label.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: shellcheck + suite | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: scripts/area-label | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: shellcheck | |
| run: shellcheck -x ./*.sh tests/*.sh | |
| - name: suites | |
| # LOOP, don't list: `bash a.sh b.sh` would run only a.sh and silently skip the rest. | |
| run: | | |
| for t in tests/*.sh; do | |
| echo "== $t" | |
| bash "$t" || exit 1 | |
| done |