test(nox): updated noxfile.py #66
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
timeout-minutes: 20 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 6 | |
matrix: | |
os: [ 'ubuntu-latest', 'macos-latest' ,'windows-latest' ] | |
python: [ 'pypy-3.8', '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
exclude: | |
# unable to install cryptography on this job | |
- os: macos-latest | |
python: pypy-3.8 | |
# weird error when installing packages with poetry | |
- os: windows-latest | |
python: pypy-3.8 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install python dependencies | |
run: python -m pip install -U pip nox | |
- name: Lint | |
run: nox -s lint | |
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12' | |
- name: Scan packages for vulnerabilities | |
run: nox -s safety | |
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12' | |
- name: CPython tests | |
run: nox -s tests-${{ matrix.python }} | |
if: matrix.python != 'pypy-3.8' | |
- name: Pypy tests | |
run: nox -s tests-pypy3 | |
if: matrix.python == 'pypy-3.8' | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
if: matrix.python == '3.12' | |
with: | |
files: ./coverage.xml |