Add include-hidden-files: true for coverage files
#5922
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, pull_request, workflow_dispatch] | |
| permissions: | |
| contents: "read" | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| FORCE_COLOR: 1 | |
| jobs: | |
| package: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Setup Python" | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.x" | |
| cache: "pip" | |
| - name: "Check packages" | |
| run: | | |
| python -m pip install -U pip setuptools wheel build twine rstcheck | |
| python -m build | |
| rstcheck --ignore-messages "(Duplicate implicit target name:.*)" CHANGES.rst | |
| python -m twine check dist/* | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] | |
| os: | |
| - macos-15 | |
| - windows-latest | |
| - ubuntu-24.04 | |
| nox-session: [''] | |
| include: | |
| - experimental: false | |
| # integration | |
| # 3.9 has a known issue with large SSL requests that we work around: | |
| # https://github.com/urllib3/urllib3/pull/3181#issuecomment-1794830698 | |
| - python-version: "3.9" | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test_integration | |
| - python-version: "3.12" | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test_integration | |
| # Test with 3.12.2 for https://github.com/urllib3/urllib3/pull/3620 patch | |
| - python-version: "3.12.2" | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test-3.12 | |
| # pypy | |
| - python-version: "pypy-3.10" | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test-pypy3.10 | |
| - python-version: "pypy-3.11" | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test-pypy3.11 | |
| - python-version: "3.x" | |
| # brotli | |
| os: ubuntu-24.04 | |
| experimental: false | |
| nox-session: test_brotlipy | |
| - python-version: "3.12" | |
| os: ubuntu-24.04 | |
| nox-session: emscripten(node) | |
| experimental: true | |
| - python-version: "3.12" | |
| os: ubuntu-24.04 | |
| nox-session: emscripten(firefox) | |
| experimental: true | |
| - python-version: "3.12" | |
| os: ubuntu-24.04 | |
| nox-session: emscripten(chrome) | |
| experimental: true | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ fromJson('{"macos-15":"macOS","windows-latest":"Windows","ubuntu-24.04":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}} | |
| continue-on-error: ${{ matrix.experimental }} | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 # Needed to fetch the version from git | |
| persist-credentials: false | |
| - name: "Setup Python ${{ matrix.python-version }}" | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| check-latest: true | |
| - name: "Install uv" | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
| with: | |
| version: "0.9.5" | |
| - name: "Install Chrome" | |
| uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # v2.1.0 | |
| id: setup-chrome | |
| if: ${{ matrix.nox-session == 'emscripten(chrome)' }} | |
| with: | |
| install-chromedriver: true | |
| chrome-version: canary | |
| - name: Force override system chrome | |
| env: | |
| CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }} | |
| run: | | |
| sudo rm -f /usr/bin/google-chrome | |
| sudo rm -f /usr/bin/chrome | |
| sudo ln -s $CHROME_PATH /usr/bin/google-chrome | |
| sudo ln -s $CHROME_PATH /usr/bin/chrome | |
| google-chrome --version | |
| if: ${{ matrix.nox-session == 'emscripten(chrome)' }} | |
| - name: "Install Firefox" | |
| uses: browser-actions/setup-firefox@5914774dda97099441f02628f8d46411fcfbd208 # v1.7.0 | |
| if: ${{ matrix.nox-session == 'emscripten(firefox)' }} | |
| - name: "Install node.js" | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| if: ${{ matrix.nox-session == 'emscripten(node)' }} | |
| with: | |
| node-version: 22 | |
| - name: Cache pyodide downloads in nox cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| if: ${{ startsWith(matrix.nox-session, 'emscripten') }} | |
| with: | |
| path: .nox/.cache | |
| # noxfile.py contains the Pyodide version used currently. | |
| key: pyodide-downloads-${{ hashFiles('noxfile.py') }} | |
| - name: "Run tests" | |
| run: | | |
| uvx nox -s "$NOX_SESSION" | |
| env: | |
| # If no explicit nox-session is set, run the default tests for the chosen Python version | |
| NOX_SESSION: ${{ matrix.nox-session != '' && matrix.nox-session || format('test-{0}', matrix.python-version) }} | |
| - name: "Upload coverage data" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: coverage-data-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.experimental }}-${{ matrix.nox-session }} | |
| path: ".coverage.*" | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| coverage: | |
| if: always() | |
| runs-on: "ubuntu-24.04" | |
| needs: test | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Setup Python" | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.x" | |
| - name: "Install uv" | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
| with: | |
| version: "0.7.12" | |
| - name: "Install coverage" | |
| # Install the same version of coverage as in the lock file. | |
| run: uv sync --dev --frozen | |
| - name: "Download coverage data" | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| pattern: coverage-data-* | |
| merge-multiple: true | |
| - name: "Combine & check coverage" | |
| run: | | |
| uv run -m build | |
| uv run -m coverage combine | |
| uv run -m coverage html --skip-covered --skip-empty | |
| uv run -m coverage report --ignore-errors --show-missing --fail-under=100 | |
| - if: ${{ failure() }} | |
| name: "Upload report if check failed" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: coverage-report | |
| path: htmlcov |