Merge pull request #8369 from tk0miya/do_coverage_on_gha

test: Send test-coverage data from GitHub Action
This commit is contained in:
Takeshi KOMIYA
2020-11-05 02:06:52 +09:00
committed by GitHub
3 changed files with 17 additions and 31 deletions

View File

@@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [py35, py36, py37]
name: [py35, py36, py37, py38]
include:
- name: py35
python: 3.5
@@ -19,6 +19,12 @@ jobs:
- name: py37
python: 3.7
docutils: du14
- name: py38
python: 3.8
docutils: du15
coverage: "--cov ./ --cov-append --cov-config setup.cfg"
env:
PYTEST_ADDOPTS: ${{ matrix.coverage }}
steps:
- uses: actions/checkout@v2
@@ -31,9 +37,12 @@ jobs:
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install dependencies
run: pip install -U tox
run: pip install -U tox codecov
- name: Run Tox
run: tox -e ${{ matrix.docutils }} -- -vv
- name: codecov
uses: codecov/codecov-action@v1
if: matrix.coverage
windows:
runs-on: windows-latest

View File

@@ -1,34 +1,11 @@
os: linux
dist: xenial
language: python
cache: pip
env:
global:
- PYTHONFAULTHANDLER=x
- SKIP_LATEX_BUILD=1
- IS_PYTHON=true
jobs:
include:
- python: '3.8'
env:
- TOXENV=du15
- PYTEST_ADDOPTS="--cov ./ --cov-append --cov-config setup.cfg"
- language: node_js
node_js: '10.7'
env: IS_PYTHON=false
services: xvfb
language: node_js
node_js: '10.7'
services: xvfb
install:
- "sudo apt-get install graphviz"
- if [ $IS_PYTHON = true ]; then pip install -U tox codecov; fi
- if [ $IS_PYTHON = false ]; then npm install; fi
- npm install
script:
- if [ $IS_PYTHON = true ]; then tox -- -vv; fi
- if [ $IS_PYTHON = false ]; then npm test; fi
after_success:
- if [[ -e .coverage ]]; then codecov -e $TOXENV; fi
- npm test

View File

@@ -26,7 +26,7 @@ extras =
test
setenv =
PYTHONWARNINGS = all,ignore::ImportWarning:importlib._bootstrap_external,ignore::DeprecationWarning:site,ignore::DeprecationWarning:distutils
PYTEST_ADDOPTS = --color yes
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --color yes
commands=
pytest --durations 25 {posargs}