CI: Separate coverage task from main.yml

This commit is contained in:
Takeshi KOMIYA
2022-05-15 23:47:15 +09:00
parent 23ab36bcd7
commit 3e20ee6846
2 changed files with 32 additions and 29 deletions

32
.github/workflows/coverage.yml vendored Normal file
View 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

View File

@@ -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