Skip to content

Commit

Permalink
build: use an artifact for the coverage report (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Feb 7, 2024
2 parents 147e85e + aad6d9f commit 8e130a1
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: pre-commit/[email protected]

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install nox
Expand All @@ -35,9 +35,9 @@ jobs:
needs: [lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: 12rambau/setup-pandoc@test
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install nox
Expand All @@ -59,34 +59,37 @@ jobs:
python-version: "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install nox
run: pip install nox
- name: test with pytest
run: nox -s test
- name: assess dead fixtures
if: ${{ matrix.python-version == '3.10' }}
shell: bash
run: nox -s dead-fixtures
- uses: actions/upload-artifact@v4
if: ${{ matrix.python-version == '3.10' }}
with:
name: coverage
path: coverage.xml

coverage:
needs: [build, docs]
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/download-artifact@v4
with:
python-version: "3.10"
- name: Install deps
run: pip install nox coverage[toml]
- name: test with pytest
run: nox -s test
- name: assess dead fixtures
run: nox -s dead-fixtures
- name: coverage
run: coverage xml
name: coverage
path: coverage.xml
- name: codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
files: ./coverage.xml

0 comments on commit 8e130a1

Please sign in to comment.