switch to uv #1202
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repsository | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Display build environment | |
run: printenv | |
- name: Set up Python | |
uses: actions/setup-python@v5.4.0 | |
with: | |
python-version-file: .python-version | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5.2.2 | |
with: | |
enable-cache: true | |
cache-dependency-glob: uv.lock | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Run unit tests | |
run: uv run -- coverage run -m unittest discover ./tests/ -v | |
- name: Convert coverage report to XML | |
run: uv run -- coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5.3.1 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage.xml | |
flags: unittests | |
fail_ci_if_error: true | |
plugins: noop |