-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (42 loc) · 1.09 KB
/
ci-python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: CI Python
on:
pull_request:
paths: ['**.py']
jobs:
lint:
name: Lint python
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint source code
uses: chartboost/ruff-action@v1
test:
name: Test python
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up poetry
run: pipx install poetry
- name: Set up python
uses: actions/setup-python@v4
with:
cache: poetry
architecture: x64
python-version: '3.11'
- name: Install requirements
run: poetry install --only=test
- name: Test
run: |
poetry run pytest \
--junitxml=pytest.xml \
--cov-report=term-missing:skip-covered \
--cov=backend backend | tee pytest-coverage.txt
- name: Report coverage
uses: MishaKav/pytest-coverage-comment@main
with:
hide-report: true
junitxml-path: ./pytest.xml
pytest-coverage-path: ./pytest-coverage.txt