diff --git a/.github/workflows/python-3-tests.yml b/.github/workflows/python-3-tests.yml index 2560900c..e6e34b8b 100644 --- a/.github/workflows/python-3-tests.yml +++ b/.github/workflows/python-3-tests.yml @@ -16,6 +16,9 @@ jobs: strategy: matrix: python-version: [3.5, 3.6, 3.7, 3.8] + env: + PYTHON: ${{ matrix.python-version }} + OS: 'ubuntu-latest' steps: - uses: actions/checkout@v2 @@ -34,6 +37,12 @@ jobs: flake8 --count --ignore=W503,W605 --show-source --statistics pandagg # on tests, more laxist: allow "missing whitespace after ','" and "line too long" flake8 --count --ignore=W503,W605,E231,E501 --show-source --statistics tests - - name: Test with pytest - run: | - pytest + - name: Test with pytest and generate coverage report + run: + pytest --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + env_vars: OS,PYTHON + fail_ci_if_error: true diff --git a/README.md b/README.md index 626e8c4a..17c77050 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![PyPI Latest Release](https://img.shields.io/pypi/v/pandagg.svg)](https://pypi.org/project/pandagg/) -[![License](https://img.shields.io/pypi/l/pandagg.svg)](https://github.com/alkemics/pandagg/blob/master/LICENSE) -![Python package](https://github.com/alkemics/pandagg/workflows/Python%20package/badge.svg) +![Python package](https://github.com/alkemics/pandagg/workflows/Python%203%20Tests/badge.svg) +![Python package](https://github.com/alkemics/pandagg/workflows/Python%202%20Tests/badge.svg) ## What is it? diff --git a/requirements-test-2.txt b/requirements-test-2.txt index 4a1ec43a..253650d8 100644 --- a/requirements-test-2.txt +++ b/requirements-test-2.txt @@ -1,6 +1,6 @@ flake8 -coverage pytest +pytest-cov # last mock version compatible with P2 (will drop constraint when removing support for P2) mock<=3.0.5 # idem, last pandas compatible version with P2 diff --git a/requirements-test.txt b/requirements-test.txt index 43a961d8..2c441dda 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ flake8 -coverage pytest +pytest-cov mock pandas \ No newline at end of file