This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (80 loc) · 2.5 KB
/
checks.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Run checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 12 * * 6"
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./dev-requirements/nox.txt
- name: Lint with flake8
run: python -m nox -s flake8
- name: Check slotting
run: python -m nox -s slot-check
- name: Check spelling
run: python -m nox -s spell-check
- name: Run type checker
run: python -m nox -s type-check -- --force-env
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10"] # , 3.11-dev]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./dev-requirements/nox.txt
- name: Run tests
run: |
python -m nox -s test
# TODO: Could we switch over to gather coverage from the normal test runs and combining
# the result once https://github.com/nedbat/coveragepy/issues/1002 is fixed?
upload-coverage:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./dev-requirements/nox.txt
- name: Record coverage
run: |
python -m nox -s test-coverage
- name: Upload coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: 9342c4ae5c99865cd2a0510f9c4ebbf25f13c07c24399df399680620b491d11f
with:
coverageLocations: .coverage.xml:coverage.py
- name: Archive coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage_html
if-no-files-found: error