Skip to content

Commit

Permalink
Separate coverage action
Browse files Browse the repository at this point in the history
  • Loading branch information
LecrisUT committed Jun 30, 2023
1 parent c27422d commit c534408
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,30 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
- name: Install myst-nb with Sphinx ${{ matrix.sphinx }}
run: |
pip install --upgrade pip
pip install --upgrade "Sphinx${{ matrix.sphinx }}" -e .[testing]
- name: Run pytest
run: pytest --durations=10

coverage:
needs: [tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[testing]
- name: Run pytest
run: pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing

Expand All @@ -59,13 +78,11 @@ jobs:
# this is why we run `coverage xml` afterwards (required by codecov)

- name: Upload to Codecov
if: github.repository == 'executablebooks/MyST-NB' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
name: myst-nb-pytests
flags: pytests
files: ./coverage.xml
fail_ci_if_error: true

publish:

Expand Down

0 comments on commit c534408

Please sign in to comment.