mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
CI: Separate coverage task from main.yml
This commit is contained in:
32
.github/workflows/coverage.yml
vendored
Normal file
32
.github/workflows/coverage.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Coverage
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'sphinx-doc'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3
|
||||
uses: actions/setup-python@v3
|
||||
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 -U pip tox pytest-cov
|
||||
|
||||
- name: Run Tox
|
||||
run: tox --sitepackages -e py -- -vv
|
||||
env:
|
||||
PYTEST_ADDOPTS: "--cov ./ --cov-append --cov-config setup.cfg"
|
||||
|
||||
- name: codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
29
.github/workflows/main.yml
vendored
29
.github/workflows/main.yml
vendored
@@ -56,32 +56,3 @@ jobs:
|
||||
run: python -m pip install -U pip tox
|
||||
- name: Run Tox
|
||||
run: tox -e py -- -vv
|
||||
|
||||
coverage:
|
||||
# only run on pushes to branches in the sphinx-doc/sphinx repo
|
||||
if: github.repository_owner == 'sphinx-doc' && github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3
|
||||
uses: actions/setup-python@v3
|
||||
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 -U pip tox pytest-cov
|
||||
|
||||
- name: Run Tox
|
||||
run: tox --sitepackages -e py -- -vv
|
||||
env:
|
||||
PYTEST_ADDOPTS: "--cov ./ --cov-append --cov-config setup.cfg"
|
||||
|
||||
- name: codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
|
||||
Reference in New Issue
Block a user