diff options
author | Jordan Cook <JWCook@users.noreply.github.com> | 2021-09-18 12:04:26 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-09-18 12:13:55 -0500 |
commit | 1abe67c34ee78f2f898bf1af46bccadbf796bf6a (patch) | |
tree | 606af85383145518cef54f75c98859674eabfd54 | |
parent | 30754d2394a16b612366e03d6085dcc3d6f2e200 (diff) | |
parent | f258d713a915014da5bdc9fb240deb939d5ab011 (diff) | |
download | requests-cache-codecov.tar.gz |
Merge pull request #417 from JWCook/codecovcodecov
Switch from coveralls to codecov
-rw-r--r-- | .github/workflows/build.yml | 20 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | pyproject.toml | 3 |
3 files changed, 10 insertions, 16 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d7ca42..8194381 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: env: LATEST_PY_VERSION: 3.9 - COVERAGE_ARGS: '--cov --cov-report=term --cov-report=html' + COVERAGE_ARGS: '--cov --cov-report=term --cov-report=xml' XDIST_ARGS: '--numprocesses=auto --dist=loadfile' jobs: @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10.0-rc.1] + python-version: [3.7, 3.8, 3.9, 3.10.0-rc.2] fail-fast: false services: nginx: @@ -56,11 +56,6 @@ jobs: - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' run: poetry install -v -E all - - name: Workaround for issue with poetry package extras (python 3.10 only) - if: ${{ startsWith(matrix.python-version, '3.10') }} - run: | - source $VENV - pip install -U cattrs # Run tests with coverage report - name: Run tests @@ -69,15 +64,10 @@ jobs: pytest -rs -x tests/unit ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }} pytest -rs -x tests/integration --cov-append ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }} - # Latest python version: send coverage report to coveralls - - name: Run coveralls + # Latest python version: send coverage report to codecov + - name: "Upload coverage report to Codecov" if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - source $VENV - pip install coveralls - coveralls --service=github + uses: codecov/codecov-action@v2 # Run code analysis checks via pre-commit hooks analyze: @@ -1,6 +1,7 @@ # Requests-Cache [![Build](https://github.com/reclosedev/requests-cache/actions/workflows/build.yml/badge.svg)](https://github.com/reclosedev/requests-cache/actions/workflows/build.yml) -[![Documentation](https://img.shields.io/readthedocs/requests-cache/stable)](https://requests-cache.readthedocs.io/en/stable/)[![Coverage](https://coveralls.io/repos/github/reclosedev/requests-cache/badge.svg?branch=master)](https://coveralls.io/github/reclosedev/requests-cache?branch=master) +[![Codecov](https://codecov.io/gh/reclosedev/requests-cache/branch/master/graph/badge.svg?token=FnybzVWbt2)](https://codecov.io/gh/reclosedev/requests-cache) +[![Documentation](https://img.shields.io/readthedocs/requests-cache/stable)](https://requests-cache.readthedocs.io/en/stable/) [![Code Shelter](https://www.codeshelter.co/static/badges/badge-flat.svg)](https://www.codeshelter.co/) [![PyPI](https://img.shields.io/pypi/v/requests-cache?color=blue)](https://pypi.org/project/requests-cache) diff --git a/pyproject.toml b/pyproject.toml index 62bb579..038b54f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,6 +114,9 @@ skip-string-normalization = true [tool.coverage.html] directory = 'test-reports' +[tool.coverage.xml] +output = 'test-reports/coverage.xml' + [tool.coverage.run] branch = true source = ['requests_cache'] |