Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 8326124

Browse files
author
staticdev
committed
Fix coverage updates
1 parent 6b74b13 commit 8326124

File tree

1 file changed

+47
-6
lines changed

1 file changed

+47
-6
lines changed

.github/workflows/tests.yml

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/[email protected]
3434

3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v2.2.1
36+
uses: actions/setup-python@v2.1.4
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939

@@ -68,7 +68,7 @@ jobs:
6868
print("::set-output name=result::{}".format(result))
6969
7070
- name: Restore pre-commit cache
71-
uses: actions/cache@v2
71+
uses: actions/cache@v2.1.3
7272
if: matrix.session == 'pre-commit'
7373
with:
7474
path: ~/.cache/pre-commit
@@ -80,18 +80,59 @@ jobs:
8080
run: |
8181
nox --force-color --python=${{ matrix.python-version }}
8282
83+
- name: Upload coverage data
84+
if: always() && matrix.session == 'tests'
85+
uses: "actions/[email protected]"
86+
with:
87+
name: coverage-data
88+
path: ".coverage.*"
89+
8390
- name: Upload documentation
8491
if: matrix.session == 'docs-build'
85-
uses: actions/upload-artifact@v2
92+
uses: actions/upload-artifact@v2.2.1
8693
with:
8794
name: docs
8895
path: docs/_build
8996

97+
coverage:
98+
runs-on: ubuntu-latest
99+
needs: tests
100+
steps:
101+
- name: Check out the repository
102+
uses: actions/[email protected]
103+
104+
- name: Set up Python 3.9
105+
uses: actions/[email protected]
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+
uses: actions/[email protected]
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+
90133
- name: Create coverage report
91-
if: always() && matrix.session == 'tests'
92134
run: |
93135
nox --force-color --session=coverage -- xml
94136
95137
- name: Upload coverage report
96-
if: always() && matrix.session == 'tests'
97-
uses: codecov/[email protected]
138+
uses: codecov/[email protected]

0 commit comments

Comments
 (0)