Skip to content

Switch to ruff format/check, update CI, fix for 3.12 (#38) #107

Switch to ruff format/check, update CI, fix for 3.12 (#38)

Switch to ruff format/check, update CI, fix for 3.12 (#38) #107

name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- name: Check out the code
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
pip install ruff==0.3.7
- name: Lint check
run: ruff check
- name: Check formatting
run: ruff format --check
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Test with pytest
run: poetry run pytest --cov=jurigged --cov-report term-missing
- name: Verify coverage
if: ${{ matrix.python-version == '3.12' }}
run: poetry run coverage report | tail -1 | egrep "TOTAL +[0-9]+ +0 +100%"