Skip to content

Commit

Permalink
GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95)
Browse files Browse the repository at this point in the history
Code reuse

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
  • Loading branch information
cclauss and jaraco authored Nov 15, 2023
1 parent 75d9cc1 commit 5732ebe
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ jobs:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install tox
run: |
python -m pip install tox
run: python -m pip install tox
- name: Run
run: tox

diffcov:
collateral:
strategy:
fail-fast: false
matrix:
job: [diffcov, docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -64,33 +67,16 @@ jobs:
with:
python-version: 3.x
- name: Install tox
run: |
python -m pip install tox
- name: Evaluate coverage
run: tox
env:
TOXENV: diffcov

docs:
runs-on: ubuntu-latest
env:
TOXENV: docs
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
- name: Install tox
run: |
python -m pip install tox
- name: Run
run: tox
run: python -m pip install tox
- name: Eval ${{ matrix.job }}
run: tox -e ${{ matrix.job }}

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

needs:
- test
- docs
- collateral

runs-on: ubuntu-latest

Expand All @@ -115,8 +101,7 @@ jobs:
with:
python-version: 3.x
- name: Install tox
run: |
python -m pip install tox
run: python -m pip install tox
- name: Run
run: tox -e release
env:
Expand Down

0 comments on commit 5732ebe

Please sign in to comment.