Bump the github-actions group with 5 updates #513
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: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| PIP_PROGRESS_BAR: "off" | |
| jobs: | |
| tests: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| - '3.13' | |
| - '3.14' | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| with: | |
| # The full history is required for sphinx_sitemap | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -VV | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade .[tests,docs] | |
| python -m pip install git+https://github.com/dalito/pyLODE.git@nfdi4cat-2.x | |
| - name: Run tests & collect coverage | |
| run: | | |
| python -m coverage run -p -m pytest | |
| - name: Upload coverage data | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| include-hidden-files: true | |
| name: coverage-data-${{ matrix.python-version }} | |
| path: .coverage.* | |
| - name: Build Sphinx documentation | |
| run: | | |
| sphinx-build -b html --nitpicky --fail-on-warning --keep-going docs docs/_build/html | |
| coverage: | |
| name: Combine & check coverage | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: python -m pip install --upgrade coverage[toml] | |
| - name: Download data | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| with: | |
| pattern: coverage-data-* | |
| merge-multiple: true | |
| - name: Combine coverage, create reports and fail if less than threshold. | |
| run: | | |
| python -m coverage combine | |
| python -m coverage html --skip-empty | |
| echo '## Test Coverage Report' >> $GITHUB_STEP_SUMMARY | |
| python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | |
| # We are working on increasing coverage and don't accept regressions. | |
| python -m coverage report --fail-under=97 | |
| - name: Upload HTML report | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: html-report | |
| path: .htmlcov |