uv: Migrate project from Poetry to uv #186
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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] # , macos-latest, windows-latest ] | |
| python-version: [ | |
| "3.8", | |
| "3.9", | |
| "3.10", | |
| "3.11", | |
| "3.12", | |
| "3.13", | |
| ] | |
| env: | |
| OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python-version }} | |
| name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }} | |
| # https://github.com/actions/setup-python/issues/374#issuecomment-1088938718 | |
| steps: | |
| - name: Acquire sources | |
| uses: actions/checkout@v5 | |
| - name: Install Graphviz | |
| uses: ts-graphviz/setup-graphviz@v2 | |
| - name: Install uv | |
| run: pipx install uv | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| cache: 'uv' | |
| - name: Install program with dependencies | |
| run: | | |
| uv install . | |
| - name: Run tests, with coverage report | |
| run: | | |
| uv run poe coverage | |
| uv run coverage xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| files: ./coverage.xml | |
| flags: main | |
| env_vars: OS,PYTHON | |
| name: codecov-umbrella | |
| fail_ci_if_error: true |