Skip to content

Mypy, Python 3.10 - 3.12 #46

Mypy, Python 3.10 - 3.12

Mypy, Python 3.10 - 3.12 #46

Workflow file for this run

name: test-workflow
on:
# When any branch in the repository is pushed
push:
# When a pull request is created
pull_request:
# When manually triggered to run
workflow_dispatch:
jobs:
lint:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
name: Lint ${{ matrix.python-version }}
runs-on: 'ubuntu-20.04'
container: python:${{ matrix.python-version }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Lint code
run: |
pip install ruff==0.5.0
ruff check
ruff format --check
ruff check --select I
- name: Type check code
run: |
pip install mypy==1.10.1
mypy
# Run tests
test:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
# Do not cancel any jobs when a single job fails
fail-fast: false
name: Python ${{ matrix.python-version }}
runs-on: 'ubuntu-20.04'
container: python:${{ matrix.python-version }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
CFLAGS="-O0" pip install -r requirements_tests.txt
- name: Run tests
run: pytest