Replace tox and pip with uv #3841
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '48 4 * * *' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| platform: [windows-latest, macos-latest, ubuntu-latest] | |
| python-version: ["3.12", "3.14"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Install uv and python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Quality tests | |
| run: uvx pre-commit run --all-files | |
| if: matrix.platform == 'ubuntu-latest' | |
| - name: Unit tests | |
| run: | | |
| uv sync --extra tests --extra reports --extra combine --extra vis --group ci | |
| uv pip install "sympy>=1.12.1" | |
| uv run --no-sync pytest --cov=petab --cov-report=xml --cov-append --durations=10 tests | |
| - name: Coverage | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.14' |