Skip to content

improve py312 compatibility #25

improve py312 compatibility

improve py312 compatibility #25

Workflow file for this run

# 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: Lint and test
on:
push:
jobs:
pre_commit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
unit_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache poetry
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install --no-interaction
- name: Run tests
run: pytest --cov --cov-report xml --cov-report term-missing
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
verbose: true
- name: Generate coverage
run: |
python -m coverage report --fail-under=100 -m