-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.03 KB
/
python-checks.yml
File metadata and controls
41 lines (38 loc) · 1.03 KB
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
name: "Python: Lint, Test, & Coverage"
on:
push:
branches:
- 'main'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- uses: pdm-project/setup-pdm@v3
name: Install PDM
with:
python-version: ${{ matrix.python }}
architecture: x64
prerelease: true
enable-pep582: true
- name: Install headjack dependencies
run: pdm install
- name: Run Linters
working-directory: ./
run: pdm run pre-commit run --all-files
- name: Run Tests and Coverage
working-directory: ./
run: |
pdm run coverage run --source=headjack/ -m pytest tests/ ${PYTEST_ARGS}
pdm run coverage report -m --fail-under=0
pdm run coverage html