Update dependency uv to v0.9.25 #589
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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| actions: read | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| ci-pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: .python-version | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version-file: pyproject.toml | |
| - name: Install project | |
| run: uv sync --all-groups | |
| - name: run pre-commit | |
| run: uv run pre-commit run --all | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then | |
| echo "Changed files after pre-commit!" | |
| git status --porcelain --untracked-files=all | |
| exit 1 | |
| fi | |
| ci-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| sphinx-version: [7.0.*, 7.*, 8.0.*, 9.0.*, 9.*] | |
| invoke-version: [2.1.*, 2.*] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version-file: pyproject.toml | |
| - name: Install project | |
| run: uv sync --group test | |
| - name: Install sphinx | |
| run: uv pip install -U sphinx==${{ matrix.sphinx-version }} invoke==${{ matrix.invoke-version }} | |
| - name: run tests (with coverage) | |
| run: uv run --no-sync pytest --cov invoke_plugin_for_sphinx --cov tests --cov-report xml --cov-fail-under 0 tests/ | |
| - name: Rename coverage file | |
| run: | | |
| UUID=$(uuidgen) | |
| echo "UUID=${UUID}" >> $GITHUB_ENV | |
| mv .coverage .coverage.${UUID} | |
| - name: upload coverage file | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: .coverage.${{ env.UUID }} | |
| path: .coverage.${{ env.UUID }} | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| ci-coverage-reporting: | |
| needs: ci-test | |
| runs-on: ubuntu-latest | |
| if: success() | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: .python-version | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version-file: pyproject.toml | |
| - name: Download coverage files | |
| uses: actions/download-artifact@v7 | |
| with: | |
| merge-multiple: true | |
| path: coverage_files | |
| - name: Install project | |
| run: uv sync --all-groups | |
| - name: Prepare coverage files | |
| run: | | |
| cd coverage_files | |
| uv run coverage combine | |
| mv .coverage ../.coverage | |
| cd .. | |
| uv run coverage xml | |
| - name: run diff-cover | |
| run: uv run diff-cover --config-file pyproject.toml coverage.xml | |
| - name: Upload to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| file: coverage.xml |