Skip to content

Commit

Permalink
run coverage check on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Jan 14, 2024
1 parent 587e011 commit f457ad9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Coverage

on:
push:
branches: [master]
pull_request:

jobs:
coverage:
runs-on: ubuntu-latest
name: Coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3'
- name: Check Python version
run: python --version
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test] pytest-cov
- name: Test with pytest
run: python -m pytest -vv --cov . --cov-append --cov-config pyproject.toml
env:
VIRTUALENV_SYSTEM_SITE_PACKAGES: '1'
- name: codecov
uses: codecov/codecov-action@v3
26 changes: 0 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,29 +141,3 @@ jobs:
env:
PYTHONWARNINGS: "error" # treat all warnings as errors
DO_EPUBCHECK: "1"

coverage:
if: github.event_name == 'push' && github.repository_owner == 'sphinx-doc'
runs-on: ubuntu-latest
name: Coverage

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Check Python version
run: python --version
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test] pytest-cov
- name: Test with pytest
run: python -m pytest -vv --cov . --cov-append --cov-config pyproject.toml
env:
VIRTUALENV_SYSTEM_SITE_PACKAGES: "1"
- name: codecov
uses: codecov/codecov-action@v3

0 comments on commit f457ad9

Please sign in to comment.