-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1 KB
/
test.yml
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
name: Lint/Test
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.12"
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Run image
uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd
- name: Format
uses: psf/black@1b2427a2b785cc4aac97c19bb4b9a0de063f9547 # v24.10.0
- name: Install dependencies
run: |
poetry install
- name: Unit Tests
run: |
set -o pipefail
poetry run pytest --junitxml=pytest.xml --cov=. tests | tee pytest-coverage.txt
- name: Comment coverage
uses: MishaKav/pytest-coverage-comment@81882822c5b22af01f91bd3eacb1cefb6ad73dc2 #v1.1.53
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml