fix: update workflow triggers #5
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: Lint and Test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| push: | |
| jobs: | |
| lint: | |
| name: Lint code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.7.4" | |
| enable-cache: true | |
| - name: Sync development environment | |
| run: "uv sync --group dev" | |
| - name: Run Lint | |
| run: "scripts/lint.sh" | |
| tests: | |
| name: "Tests (Python ${{ matrix.python-version }} on ${{ matrix.os }})" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest"] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "${{ matrix.python-version }}" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.7.4" | |
| enable-cache: true | |
| - name: Sync environment | |
| run: "uv sync --all-extras --group dev" | |
| - name: Run tests | |
| run: "uv run pytest" |