Support more than two digits of each unit #812
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
name: Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
build-package: | |
name: Build & verify package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: hynek/build-and-inspect-python-package@v2 | |
id: baipp | |
outputs: | |
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }} | |
tests: | |
name: Tests on ${{ matrix.python-version }} | |
needs: build-package | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ${{ fromJson(needs.build-package.outputs.python-versions) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download pre-built packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: Packages | |
path: dist | |
- run: tar xf dist/*.tar.gz --strip-components=1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
cache: pip | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
poetry --version | |
- name: Install Nox | |
run: | | |
pipx install nox | |
pipx inject nox nox-poetry | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data-${{ matrix.python-version }} | |
path: .coverage.* | |
if-no-files-found: ignore | |
- name: Run Nox | |
run: | | |
nox --force-color --python=${{ matrix.python-version }} | |
- name: Upload coverage data | |
uses: "actions/[email protected]" | |
with: | |
name: coverage-data | |
path: ".coverage.*" | |
coverage: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: .python-version-default | |
cache: pip | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
poetry --version | |
- name: Install Nox | |
run: | | |
pipx install nox | |
pipx inject nox nox-poetry | |
- name: Download coverage data | |
uses: actions/[email protected] | |
with: | |
name: coverage-data | |
- name: Combine coverage data and display human readable report | |
run: | | |
nox --force-color --session=coverage | |
- name: Create coverage report | |
run: | | |
nox --force-color --session=coverage -- xml | |
- name: Upload coverage report | |
uses: codecov/[email protected] | |
required-checks-pass: | |
name: Ensure everything required is passing for branch protection | |
if: always() | |
needs: | |
- coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |