Skip to content

fix 3.9 compat

fix 3.9 compat #17

Workflow file for this run

# SPDX-FileCopyrightText: 2021-2023 Constantine Evans <const@costi.net>
#
# SPDX-License-Identifier: EUPL-1.2
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
branches:
- main
paths-ignore:
- CHANGELOG.md
- README.md
- AUTHORS.md
pull_request:
branches:
- main
jobs:
# black:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: psf/black@stable
# with:
# options: "--check --verbose --diff"
# src: "./src"
mypy:
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools
python -m pip install --upgrade attrs types-attrs
python -m pip install --upgrade .
python -m pip install flake8 tox mypy
- name: Mypy
run: |
mypy --cache-dir .mypy_cache --install-types --non-interactive ./src
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools
python -m pip install --upgrade .[tests]
- name: Test with pytest
run: |
python -m pytest --cov --cov-report=xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}