-
Notifications
You must be signed in to change notification settings - Fork 11
102 lines (86 loc) · 2.46 KB
/
main.yml
File metadata and controls
102 lines (86 loc) · 2.46 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
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: Tests
on: [push, pull_request]
jobs:
pre-commit:
name: Pre-Commit Checks
runs-on: ubuntu-latest
steps:
- name: Checkout to master
uses: actions/checkout@3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Pre-Commit Checks
run: |
python -m pip install pip --upgrade
pip install nox
nox -s pre_commit
- name: Analysis (git diff)
if: failure()
run: git diff
package:
name: Build & Verify Package
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout to master
uses: actions/checkout@3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Build and check with twine
run: |
python -m pip install pip --upgrade
pip install nox
nox -s package
unit-tests:
name: UnitTests-Python-${{ matrix.python-version }}
needs: [ pre-commit, package ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 'pypy3.9', '3.7', '3.8', '3.9', '3.10' ]
steps:
- name: Checkout to master
uses: actions/checkout@3
- name: Setup Python-${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Unit Tests
run: |
python -m pip install pip --upgrade
pip install nox
nox -s ci_tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.6
with:
file: coverage.xml
flags: unittests
name: codecov-linkstatus-{{ matrix.python-version }}
fail_ci_if_error: true
platform:
name: Platform-${{ matrix.os }}
needs: [ unit-tests]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout to master
uses: actions/checkout@3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Development setup and smoke test on platform ${{ matrix.os }}
run: |
python -m pip install pip --upgrade
pip install nox
nox -s dev_setup