mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-16 10:22:13 -05:00
CI: Separate coverage task from main.yml
This commit is contained in:
1 parent
23ab36bcd7
commit
3e20ee6846
2 files changed
+32
-29
No files matched your search
@@ -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
|
||||
@@ -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