use uv in docs gh action (#147) #600
Workflow file for this run
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 Python | |
| on: [push, pull_request] | |
| jobs: | |
| test_basic: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python with uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Python version | |
| run: python -V | |
| - name: Install default dependencies + pytest | |
| run: | | |
| uv pip install . | |
| uv pip install pytest | |
| - name: Test with pytest | |
| run: pytest tests/test_basic.py | |
| test_optimizer: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python with uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Python version | |
| run: python -V | |
| - name: Install all optional dependencies | |
| run: | | |
| uv pip install ".[optimizer,dev]" | |
| - name: Test with pytest | |
| run: | | |
| pytest --cov=fsrs --cov-report= --cov-append tests/test_basic.py | |
| pytest --cov=fsrs --cov-report=xml --cov-append tests/test_optimizer.py -n auto | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |