build: Bump version #30
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: | |
tests: | |
name: ${{ matrix.python-version }} / ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
python-version: [ "3.9", "3.10", "3.11", "3.12"] | |
env: | |
NOXSESSION: ${{ matrix.python-version }} / ${{ matrix.os }} | |
FORCE_COLOR: "1" | |
PRE_COMMIT_COLOR: "always" | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3.5.3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4.6.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Upgrade pip in virtual environments | |
shell: python | |
run: | | |
import os | |
import pip | |
with open(os.environ["GITHUB_ENV"], mode="a") as io: | |
print(f"VIRTUALENV_PIP={pip.__version__}", file=io) | |
- name: Install Poetry | |
run: | | |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | |
poetry --version | |
- name: Make poetry install | |
run: | | |
poetry install --with dev | |
- name: Run nox | |
run: poetry run nox --non-interactive --error-on-missing-interpreter --session "tests-${{ matrix.python-version }}" | |
- name: Upload coverage data | |
if: always() && matrix.session == 'tests' | |
uses: "actions/upload-artifact@v3.1.2" | |
with: | |
name: coverage-data | |
path: ".coverage.*" | |
coverage: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3.5.3 | |
- name: Set up Python | |
uses: actions/setup-python@v4.6.1 | |
with: | |
python-version: "3.11" | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | |
poetry --version | |
- name: Make poetry install | |
run: | | |
poetry install --with dev | |
- name: Combine coverage data and display human readable report | |
run: | | |
poetry run nox --session=coverage | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3.1.4 |