chore(deps-dev): bump safety from 3.2.0 to 3.2.3 #3025
Workflow file for this run
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 | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: "${{ matrix.session }} (using Python ${{ matrix.python-version }} on ${{ matrix.runs-on || 'ubuntu-latest' }})" | |
runs-on: "${{ matrix.runs-on || 'ubuntu-latest' }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { python-version: "3.12", session: "flake8" } | |
- { python-version: "3.12", session: "flake8", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "flake8", runs-on: "windows-2022" } | |
- { python-version: "3.12", session: "safety" } | |
- { python-version: "3.12", session: "pylint" } | |
- { python-version: "3.12", session: "pylint", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "pylint", runs-on: "windows-2022" } | |
- { python-version: "3.11", session: "pylint" } | |
- { python-version: "3.10", session: "pylint" } | |
- { python-version: "3.9", session: "pylint" } | |
- { python-version: "3.8", session: "pylint" } | |
- { python-version: "3.12", session: "mypy" } | |
- { python-version: "3.12", session: "mypy", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "mypy", runs-on: "windows-2022" } | |
- { python-version: "3.11", session: "mypy" } | |
- { python-version: "3.10", session: "mypy" } | |
- { python-version: "3.9", session: "mypy" } | |
- { python-version: "3.8", session: "mypy" } | |
- { python-version: "3.12", session: "tests" } | |
- { python-version: "3.12", session: "tests", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "tests", runs-on: "windows-2022" } | |
- { python-version: "3.11", session: "tests" } | |
- { python-version: "3.10", session: "tests" } | |
- { python-version: "3.9", session: "tests" } | |
- { python-version: "3.8", session: "tests" } | |
- { python-version: "3.12", session: "typeguard" } | |
- { python-version: "3.12", session: "typeguard", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "typeguard", runs-on: "windows-2022" } | |
- { python-version: "3.12", session: "xdoctest" } | |
- { python-version: "3.12", session: "xdoctest", runs-on: "macos-12" } | |
- { python-version: "3.12", session: "xdoctest", runs-on: "windows-2022" } | |
- { python-version: "3.12", session: "docs" } | |
env: | |
NOXSESSION: "${{ matrix.session }}" | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up Python "${{ matrix.python-version }}" | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt poetry | |
poetry --version | |
- name: Install Nox | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry | |
nox --version | |
- name: Run Nox | |
run: | | |
nox --force-color --python="${{ matrix.python-version }}" | |
- name: Upload coverage data | |
if: always() && matrix.session == 'tests' | |
uses: "actions/upload-artifact@v4.3.3" | |
with: | |
name: "coverage-data-${{ matrix.python-version }}-${{ matrix.runs-on || 'ubuntu-latest' }}" | |
path: ".coverage.*" | |
- name: Upload documentation | |
if: matrix.session == 'docs' | |
uses: "actions/upload-artifact@v4.3.3" | |
with: | |
name: docs | |
path: "docs/_build" | |
coverage: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: "3.12" | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt poetry | |
poetry --version | |
- name: Install Nox | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry | |
nox --version | |
- name: Download coverage data | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
pattern: coverage-data-* | |
merge-multiple: true | |
- 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/codecov-action@v4.5.0 | |
tests-success: | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
needs: | |
- tests | |
- coverage | |
steps: | |
- name: Ensure tests succeeded | |
if: "${{ needs.tests.result != 'success' }}" | |
run: | | |
exit 1 | |
- name: Ensure coverage succeeded | |
if: "${{ needs.coverage.result != 'success' }}" | |
run: | | |
exit 1 |