From 681b6837b57db807f7341f6526f8c139666f5248 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Mon, 22 Jan 2024 19:31:16 +0100 Subject: [PATCH] Adjust coverage settings --- .github/workflows/test.yml | 19 +++++++++++-------- Makefile | 7 ++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c286c5318..be17ed630 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,24 +77,27 @@ jobs: run: | psql -c "CREATE DATABASE testdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres -h localhost - - name: Run tests with optional dependencies - if: endsWith(matrix.pyenv, '-raw') != true - run: make tests - - name: Run tests with minimal dependencies if: endsWith(matrix.pyenv, '-raw') == true run: make tests-raw + - name: Run tests with optional dependencies + if: endsWith(matrix.pyenv, '-raw') != true + env: + COVERAGE_DEBUG: config,trace,pathmap + run: make tests + - name: Coveralls for ${{ matrix.pyenv }} + if: endsWith(matrix.pyenv, '-raw') != true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_FLAG_NAME: ${{ matrix.pyenv }} COVERALLS_PARALLEL: true run: | - .venv/bin/python -m pip install coveralls - .venv/bin/coveralls --service=github + pip install coveralls + coveralls --service=github - coveralls: + finish: name: Coveralls Finished needs: unit-test runs-on: ubuntu-latest @@ -104,7 +107,7 @@ jobs: python-version: "3.x" - name: Install coveralls run: pip install coveralls - - name: Finished + - name: Coveralls Finished env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: coveralls --service=github --finish diff --git a/Makefile b/Makefile index df2292b25..66fca0c21 100644 --- a/Makefile +++ b/Makefile @@ -85,10 +85,11 @@ migrate: install $(SERVER_CONFIG) test: tests tests-once: tests -tests: install-postgres install-monitoring install-memcached version-file tests-raw +tests: install-postgres install-monitoring install-memcached version-file install-dev + $(VENV)/bin/py.test --cov-config setup.cfg --cov-report term-missing --cov-fail-under 100 --cov kinto -tests-raw: install-dev - $(VENV)/bin/py.test --cov-report term-missing --cov-fail-under 100 --cov kinto +tests-raw: version-file install-dev + $(VENV)/bin/py.test lint: install-dev $(VENV)/bin/ruff check kinto tests docs/conf.py