CI: Separate coverage task from main.yml

This commit is contained in:
Takeshi KOMIYA committed 2022-05-16 00:02:14 +09:00
1 parent 23ab36bcd7
commit 3e20ee6846
2 files changed
+32 -29

No files matched your search

+32
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
-29
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