-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (45 loc) · 1.44 KB
/
check.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: check
on:
- push
- pull_request
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.3.0
with:
python-version: "3.10"
- name: Set up poetry
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
with:
poetry-version: "2.0.0"
- name: Install dependencies
run: poetry install --only main,dev
- name: Run linter
run: poetry run poe lint
- name: Run formatter
run: poetry run poe format
- name: Run version check
run: poetry run poe versioncheck
- name: Install test dependencies
run: poetry install --only main,dev,test
- name: Run tests
run: poetry run poe test --cov-branch --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
- name: Install types
run: poetry install --only main,dev,test,types
- name: Run type checking
run: poetry run poe typecheck
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}