mirror of
https://github.com/gorules/zen.git
synced 2026-10-06 00:02:31 +00:00
feat: add batch evaluation for python and tests in workflows
This commit is contained in:
@@ -15,8 +15,50 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test - ${{ matrix.os }} - py${{ matrix.python }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.WORKING_DIRECTORY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
python: [ '3.9', '3.13' ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache + sccache
|
||||
uses: ./.github/actions/setup-rust
|
||||
with:
|
||||
shared-key: python-test
|
||||
sccache-bucket: ${{ secrets.SCCACHE_S3_BUCKET }}
|
||||
sccache-region: ${{ secrets.SCCACHE_AWS_REGION }}
|
||||
sccache-role-arn: ${{ secrets.SCCACHE_AWS_ROLE_ARN }}
|
||||
|
||||
- name: Build and install wheel
|
||||
run: |
|
||||
python -m pip install --upgrade pip maturin
|
||||
maturin build --release --out dist -m Cargo.toml
|
||||
pip install --force-reinstall dist/*.whl
|
||||
shell: bash
|
||||
|
||||
- name: Run tests
|
||||
run: python -m unittest test_sync test_async
|
||||
shell: bash
|
||||
|
||||
# The build jobs skip on release events for other components (release-please fires
|
||||
# one `release` event per component; only `python-v*` should build/publish here).
|
||||
wheels:
|
||||
@@ -94,7 +136,7 @@ jobs:
|
||||
environment: release
|
||||
# Publishes only on the release-please GitHub Release for the python component.
|
||||
if: "github.ref_type == 'tag'"
|
||||
needs: [ wheels, sdist ]
|
||||
needs: [ test, wheels, sdist ]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user