Skip to content

Commit bf3b622

Browse files
committed
Run the tests before publishing
A tag can be pushed at a commit whose CI never ran or went red, which is exactly what happened with 0.1.1: the README merge broke lint on main and the release went out anyway. Publishing is the one irreversible step here, so the release workflow now runs the suite, ruff and mypy before it builds anything.
1 parent 6186319 commit bf3b622

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,22 @@ permissions:
88
contents: read
99

1010
jobs:
11+
test:
12+
# A tag can be pushed at a commit whose CI never ran or went red. Publishing
13+
# is the one irreversible step here, so the tests run again on the way out.
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
17+
with:
18+
persist-credentials: false
19+
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
20+
- run: uv sync
21+
- run: uv run pytest -q
22+
- run: uv run ruff check .
23+
- run: uv run mypy
24+
1125
build:
26+
needs: test
1227
runs-on: ubuntu-latest
1328
steps:
1429
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

0 commit comments

Comments
 (0)