From 3e034c29cafaa36c92e24fb3c646463a6d037b8c Mon Sep 17 00:00:00 2001 From: akrherz Date: Fri, 3 Mar 2023 09:11:49 -0600 Subject: [PATCH] CI: update codecov usage --- .github/workflows/main.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd1d5235f..7851f70b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: . .ci_tooling/postgres.sh . .ci_tooling/miniconda.sh . .ci_tooling/memcached.sh - pip install codecov requests-mock + pip install coverage requests-mock python -m pip install . --upgrade export PATH="/usr/lib/postgresql/14/bin:$PATH" cd database; sh bootstrap.sh @@ -34,16 +34,20 @@ jobs: psql -f data/postgis/cwsu.db -U mesonet postgis cd .. python util/insert_testing_data.py - coverage run --source=pyiem setup.py test --addopts "--mpl --mpl-results-path=mplresults" - if [[ ${{ matrix.PYTHON_VERSION }} == '3.8' ]]; then - codecov - fi + pytest --mpl --cov=./ --cov-report xml conda install sphinx cd docs make html touch build/html/.nojekyll cd .. - + + - name: Code coverage + if: ${{ matrix.PYTHON_VERSION == '3.8' }} + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + - name: Build and Deploy if: ${{ matrix.PYTHON_VERSION == '3.8' }} uses: JamesIves/github-pages-deploy-action@releases/v3