Skip to content

Commit 5732ebe

Browse files
cclaussjaraco
andauthored
GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95)
Code reuse Co-authored-by: Jason R. Coombs <[email protected]>
1 parent 75d9cc1 commit 5732ebe

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ jobs:
4848
python-version: ${{ matrix.python }}
4949
allow-prereleases: true
5050
- name: Install tox
51-
run: |
52-
python -m pip install tox
51+
run: python -m pip install tox
5352
- name: Run
5453
run: tox
5554

56-
diffcov:
55+
collateral:
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
job: [diffcov, docs]
5760
runs-on: ubuntu-latest
5861
steps:
5962
- uses: actions/checkout@v4
@@ -64,33 +67,16 @@ jobs:
6467
with:
6568
python-version: 3.x
6669
- name: Install tox
67-
run: |
68-
python -m pip install tox
69-
- name: Evaluate coverage
70-
run: tox
71-
env:
72-
TOXENV: diffcov
73-
74-
docs:
75-
runs-on: ubuntu-latest
76-
env:
77-
TOXENV: docs
78-
steps:
79-
- uses: actions/checkout@v4
80-
- name: Setup Python
81-
uses: actions/setup-python@v4
82-
- name: Install tox
83-
run: |
84-
python -m pip install tox
85-
- name: Run
86-
run: tox
70+
run: python -m pip install tox
71+
- name: Eval ${{ matrix.job }}
72+
run: tox -e ${{ matrix.job }}
8773

8874
check: # This job does nothing and is only used for the branch protection
8975
if: always()
9076

9177
needs:
9278
- test
93-
- docs
79+
- collateral
9480

9581
runs-on: ubuntu-latest
9682

@@ -115,8 +101,7 @@ jobs:
115101
with:
116102
python-version: 3.x
117103
- name: Install tox
118-
run: |
119-
python -m pip install tox
104+
run: python -m pip install tox
120105
- name: Run
121106
run: tox -e release
122107
env:

0 commit comments

Comments
 (0)