Migrate to uv #169
This file contains 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: unit tests | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/unit_tests.yml | |
- .github/workflows/integration_tests.yml | |
- '**.py' | |
- '**.html' | |
- '**.jinja' | |
- '**.js' | |
- uv.lock | |
- pyproject.toml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/unit_tests.yml | |
- .github/workflows/integration_tests.yml | |
- '**.py' | |
- '**.html' | |
- '**.jinja' | |
- '**.js' | |
- uv.lock | |
- pyproject.toml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Install uv | |
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 | |
with: | |
# Install a specific version of uv. | |
version: "0.5.21" | |
enable-cache: true | |
- name: "Set up Python" | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 | |
with: | |
python-version-file: ".python-version" | |
- name: Install the project | |
run: uv sync --dev | |
- run: | | |
source .venv/bin/activate | |
pytest -m "not integration_test" --cov-report term --cov-report xml:./coverage.xml --cov=cyclops -n auto --dist loadscope | |
- name: Upload coverage to Codecov | |
uses: Wandalen/[email protected] | |
with: | |
action: codecov/[email protected] | |
with: | | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
attempt_limit: 5 | |
attempt_delay: 30000 |