ci(release): run tests before publishing
Gate both publish jobs on the package's test suite: npm test --if-present before the npm build/publish, and pytest (when a tests/ or test/ directory exists, matching python.yml's guard) before the PyPI build/publish. Previously nothing between tagging and publishing ran a single test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AViME1R9ES2UXT1uQDx1TG
This commit is contained in:
parent
4307b95aee
commit
dab3489b73
1 changed files with 13 additions and 0 deletions
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
|
@ -138,6 +138,15 @@ jobs:
|
|||
working-directory: src/${{ matrix.package }}
|
||||
run: uv run --frozen pyright
|
||||
|
||||
- name: Run tests
|
||||
working-directory: src/${{ matrix.package }}
|
||||
run: |
|
||||
if [ -d "tests" ] || [ -d "test" ]; then
|
||||
uv run pytest
|
||||
else
|
||||
echo "No tests directory, skipping"
|
||||
fi
|
||||
|
||||
- name: Build package
|
||||
working-directory: src/${{ matrix.package }}
|
||||
run: uv build
|
||||
|
|
@ -189,6 +198,10 @@ jobs:
|
|||
fi
|
||||
echo "Version $VERSION is new, proceeding with publish"
|
||||
|
||||
- name: Run tests
|
||||
working-directory: src/${{ matrix.package }}
|
||||
run: npm test --if-present
|
||||
|
||||
- name: Build package
|
||||
working-directory: src/${{ matrix.package }}
|
||||
run: npm run build
|
||||
|
|
|
|||
Loading…
Reference in a new issue