perf: Optimize lint commands #4
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: [push, pull_request] | |
| jobs: | |
| lint: | |
| 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: Syncing the environment | |
| run: "uv sync --group dev" | |
| - name: Lint code | |
| run: "scripts/lint.sh" | |
| tests: | |
| name: "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: Syncing the environment | |
| run: "uv sync --all-extras --group dev" | |
| - name: Run tests | |
| run: "uv run pytest" |