-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.73 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
static-analysis:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: install-poetry
run: pipx install poetry
- name: setup-python
uses: actions/setup-python@v4
with:
python-version-file: pyproject.toml
cache: poetry
- name: install-dependencies
run: poetry install --no-interaction --only dev
- name: ruff-check
run: poetry run ruff check .
- name: ruff-format
run: poetry run ruff format --check .
- name: mypy
run: poetry run mypy .
tests:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
fail-fast: false
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: install-poetry
run: pipx install poetry
- name: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: install-dependencies
run: poetry install --no-interaction
- name: pytest
run: |
poetry run coverage run -m pytest . -vv
poetry run coverage report -m --skip-covered