Skip to content

Commit

Permalink
Fix coverage reporting (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar committed Jan 21, 2023
1 parent 09cf4ab commit a18ea18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@ on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
max-parallel: 8
matrix:
os:
- ubuntu-latest
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy3.9]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run:
python -m pip install --upgrade pip
pip install tox tox-gh-actions

- name: Test with tox
run: tox
24 changes: 13 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
[tox]
envlist = lint,py{35,36,37,38,39,310,311},pypy3,manifest,coverage-report
envlist = lint,py{37,38,39,310,311},pypy3,manifest,coverage-report

[gh-actions]
python =
3.7: py37, coverage-report
3.8: py38, coverage-report
3.9: py39, coverage-report
3.10: py310, lint, manifest, coverage-report
3.11: py311, coverage-report
pypy-3.9: pypy3, coverage-report
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311, lint, manifest
pypy-3.9: pypy3

[testenv]
deps =
pytest
coverage
pytest-cov
sh
click
py{37,38,39,310,311,py3}: ipython
commands = coverage run --parallel -m pytest {posargs}
py{37,38,39,310,311,pypy3}: ipython
commands = pytest --cov --cov-report=term-missing --cov-config setup.cfg {posargs}
depends =
py{37,38,39,310,311},pypy3: coverage-clean
coverage-report: py{35,36,37,38,39,310,311},pypy3

[testenv:lint]
skip_install = true
Expand Down Expand Up @@ -46,5 +49,4 @@ commands = coverage erase
deps = coverage
skip_install = true
commands =
coverage combine
coverage report

0 comments on commit a18ea18

Please sign in to comment.