Merge pull request #17 from shinpr/feat/cross-platform-windows-support #43
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| # Boundaries of the supported range (requires-python = ">=3.9"); the | |
| # floor catches accidental newer-syntax usage, the ceiling catches | |
| # deprecations. Intermediate minors rarely surface unique issues. | |
| python-version: ['3.9', '3.12'] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest ruff pre-commit tomli | |
| - name: Run lint | |
| run: ruff check . | |
| - name: Check plugin sync | |
| run: python scripts/sync_plugin.py --check | |
| - name: Run tests | |
| run: pytest tests/ -v | |
| # Stable aggregate check. The `main` ruleset requires a status named `ci`, | |
| # so this job keeps that name regardless of the test matrix dimensions | |
| # (OS / Python version), preventing required-check drift when the matrix | |
| # changes. | |
| ci: | |
| needs: [test] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify the test matrix succeeded | |
| if: needs.test.result != 'success' | |
| run: exit 1 |