Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tuduun authored Mar 20, 2024
1 parent 7c7802f commit 171a7ac
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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

0 comments on commit 171a7ac

Please sign in to comment.