From f258d713a915014da5bdc9fb240deb939d5ab011 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sat, 18 Sep 2021 11:43:16 -0500 Subject: Switch from coveralls to codecov --- .github/workflows/build.yml | 20 +++++--------------- README.md | 3 ++- 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: diff --git a/README.md b/README.md index 03d24f2..812480a 100644 --- a/README.md +++ b/README.md @@ -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'] -- cgit v1.2.1