Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Lint with Ruff
run: |
poetry run ruff .
- name: Run tests with pytest
run: |
poetry run pytest
- name: Check code coverage
run: |
poetry run coverage run -m pytest
poetry run coverage report -m --fail-under=80