Merge pull request #19 from modern-python/ci/split-into-checks #59
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
| name: main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| checks: | |
| uses: ./.github/workflows/_checks.yml | |
| action-smoke: | |
| # PR-only: action-smoke has no value on push-to-main, where the dogfood | |
| # workflow (`.github/workflows/semvertag.yml`) exercises the real | |
| # composite action against the merge commit. Under `dry-run: true`, | |
| # this job is side-effect-free regardless of main's tag state. | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| # No `permissions:` block: `contents: read` is sufficient because | |
| # dry-run guarantees no tag-push attempt. Even a future regression | |
| # that bypassed dry-run would be denied by the API. | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - id: semvertag | |
| uses: ./ | |
| with: | |
| dry-run: 'true' | |
| env: | |
| SEMVERTAG_BRANCH_PREFIX__MINOR: '["feat/"]' | |
| - name: Verify the composite normalized dry-run to no-bump | |
| # Under `dry-run: true`, the CLI's status is one of `dry_run`, | |
| # `no_tags`, `already_tagged`, `no_merge_commit`, `no_conforming_commit` — | |
| # all normalized to `no-bump` by action.yml. If action.yml's | |
| # dry-run wiring regresses, the CLI would push a tag, status would | |
| # be `created`, and this assertion would fail loudly. `bump` is | |
| # intentionally NOT asserted: under dry-run it reflects the would-be | |
| # value (`patch`/`minor`/`major` for an untagged merge, `none` | |
| # otherwise) — not a stable smoke value. | |
| run: | | |
| test "${{ steps.semvertag.outputs.status }}" = "no-bump" |