Deeper uv integration #115
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
# This workflow will install Python dependencies, run tests with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python package | |
on: | |
push: | |
branches: | |
- "main" | |
- "develop" | |
pull_request: | |
branches: | |
- "main" | |
- "develop" | |
jobs: | |
test: | |
name: Test on Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
make run-ci | |
- name: Create coverage badge | |
uses: gaelgirodon/[email protected] | |
with: | |
gist-id: ${{ vars.GIST_ID_BADGES }} | |
token: ${{ secrets.GIST_TOKEN }} | |
prefix: ${{ github.event.repository.name }}_${{ matrix.python-version }} | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test Results (Python ${{ matrix.python-version }}) | |
path: report.xml | |
report: | |
name: Comment test results | |
runs-on: ubuntu-latest | |
needs: test | |
permissions: | |
checks: write | |
# only needed unless run with comment_mode: off | |
pull-requests: write | |
# only needed for private repository | |
contents: read | |
# only needed for private repository | |
issues: read | |
if: always() | |
steps: | |
- name: Download Test Results | |
uses: actions/download-artifact@v4 | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: "**/*.xml" | |
- name: Fail if any matrix job failed | |
if: needs.test.result != 'success' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.setFailed('Some matrix job failed. Please check the logs.') |