@@ -12,16 +12,18 @@ jobs:
12
12
fail-fast : false
13
13
matrix :
14
14
include :
15
- - { python-version: 3.8, os: ubuntu-latest, session: "pre-commit" }
16
- - { python-version: 3.8, os: ubuntu-latest, session: "safety" }
15
+ - { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
16
+ - { python-version: 3.9, os: ubuntu-latest, session: "safety" }
17
+ - { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
17
18
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
18
19
- { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
20
+ - { python-version: 3.9, os: ubuntu-latest, session: "tests" }
19
21
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
20
22
- { python-version: 3.7, os: ubuntu-latest, session: "tests" }
21
- - { python-version: 3.8 , os: windows-latest, session: "tests" }
22
- - { python-version: 3.8 , os: macos-latest, session: "tests" }
23
- # - { python-version: 3.8 , os: ubuntu-latest, session: "typeguard" }
24
- - { python-version: 3.8 , os: ubuntu-latest, session: "docs-build" }
23
+ - { python-version: 3.9 , os: windows-latest, session: "tests" }
24
+ - { python-version: 3.9 , os: macos-latest, session: "tests" }
25
+ # - { python-version: 3.9 , os: ubuntu-latest, session: "typeguard" }
26
+ - { python-version: 3.9 , os: ubuntu-latest, session: "docs-build" }
25
27
26
28
env :
27
29
NOXSESSION : ${{ matrix.session }}
31
33
32
34
33
35
- name : Set up Python ${{ matrix.python-version }}
34
- uses : actions/setup-python@v2.2.1
36
+ uses : actions/setup-python@v2.1.4
35
37
with :
36
38
python-version : ${{ matrix.python-version }}
37
39
47
49
48
50
- name : Install Nox
49
51
run : |
50
- pip install --constraint=.github/workflows/constraints.txt nox
52
+ pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
51
53
nox --version
52
54
53
55
- name : Compute pre-commit cache key
66
68
print("::set-output name=result::{}".format(result))
67
69
68
70
- name : Restore pre-commit cache
69
- uses : actions/cache@v2
71
+ uses : actions/cache@v2.1.3
70
72
if : matrix.session == 'pre-commit'
71
73
with :
72
74
path : ~/.cache/pre-commit
@@ -78,18 +80,59 @@ jobs:
78
80
run : |
79
81
nox --force-color --python=${{ matrix.python-version }}
80
82
83
+ - name : Upload coverage data
84
+ if : always() && matrix.session == 'tests'
85
+
86
+ with :
87
+ name : coverage-data
88
+ path : " .coverage.*"
89
+
81
90
- name : Upload documentation
82
91
if : matrix.session == 'docs-build'
83
- uses : actions/upload-artifact@v2
92
+ uses : actions/upload-artifact@v2.2.1
84
93
with :
85
94
name : docs
86
95
path : docs/_build
87
96
97
+ coverage :
98
+ runs-on : ubuntu-latest
99
+ needs : tests
100
+ steps :
101
+ - name : Check out the repository
102
+
103
+
104
+ - name : Set up Python 3.9
105
+
106
+ with :
107
+ python-version : 3.9
108
+
109
+ - name : Upgrade pip
110
+ run : |
111
+ pip install --constraint=.github/workflows/constraints.txt pip
112
+ pip --version
113
+
114
+ - name : Install Poetry
115
+ run : |
116
+ pip install --constraint=.github/workflows/constraints.txt poetry
117
+ poetry --version
118
+
119
+ - name : Install Nox
120
+ run : |
121
+ pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
122
+ nox --version
123
+
124
+ - name : Download coverage data
125
+
126
+ with :
127
+ name : coverage-data
128
+
129
+ - name : Combine coverage data and display human readable report
130
+ run : |
131
+ nox --force-color --session=coverage
132
+
88
133
- name : Create coverage report
89
- if : always() && matrix.session == 'tests'
90
134
run : |
91
135
nox --force-color --session=coverage -- xml
92
136
93
137
- name : Upload coverage report
94
- if : always() && matrix.session == 'tests'
95
-
138
+
0 commit comments