33
33
34
34
35
35
- name : Set up Python ${{ matrix.python-version }}
36
- uses : actions/setup-python@v2.2.1
36
+ uses : actions/setup-python@v2.1.4
37
37
with :
38
38
python-version : ${{ matrix.python-version }}
39
39
68
68
print("::set-output name=result::{}".format(result))
69
69
70
70
- name : Restore pre-commit cache
71
- uses : actions/cache@v2
71
+ uses : actions/cache@v2.1.3
72
72
if : matrix.session == 'pre-commit'
73
73
with :
74
74
path : ~/.cache/pre-commit
@@ -80,18 +80,59 @@ jobs:
80
80
run : |
81
81
nox --force-color --python=${{ matrix.python-version }}
82
82
83
+ - name : Upload coverage data
84
+ if : always() && matrix.session == 'tests'
85
+
86
+ with :
87
+ name : coverage-data
88
+ path : " .coverage.*"
89
+
83
90
- name : Upload documentation
84
91
if : matrix.session == 'docs-build'
85
- uses : actions/upload-artifact@v2
92
+ uses : actions/upload-artifact@v2.2.1
86
93
with :
87
94
name : docs
88
95
path : docs/_build
89
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
+
90
133
- name : Create coverage report
91
- if : always() && matrix.session == 'tests'
92
134
run : |
93
135
nox --force-color --session=coverage -- xml
94
136
95
137
- name : Upload coverage report
96
- if : always() && matrix.session == 'tests'
97
-
138
+
0 commit comments