Extract generic test ref parser (#45) #93
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| ZIG_VERSION: "0.16.0" | |
| jobs: | |
| test: | |
| name: test py${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Zig | |
| uses: mlugg/setup-zig@v2.2.1 | |
| with: | |
| version: ${{ env.ZIG_VERSION }} | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pytest | |
| - name: Print tool versions | |
| run: | | |
| zig version | |
| python --version | |
| - name: Check whitespace | |
| run: git show --check --format=short --no-renames HEAD | |
| - name: Check Zig formatting | |
| run: zig fmt --check build.zig build.zig.zon src/main.zig src/project.zig src/root.zig | |
| - name: Run public-safety scan | |
| run: python scripts/check_public_safety.py | |
| - name: Check runtime boundary | |
| run: python scripts/check_runtime_boundary.py | |
| - name: Build Zig binary | |
| run: zig build --summary all | |
| - name: Run Zig tests | |
| run: zig build test --summary all | |
| - name: Build release-safe binary | |
| run: zig build -Doptimize=ReleaseSafe --summary all | |
| - name: Run tests | |
| run: pytest -q |