From 8492786dccfa0cbf023d9dd1795603e5951286f2 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 29 Jan 2021 15:50:53 -0300 Subject: [PATCH] Trying to get better coverage report. --- .github/workflows/pythonapp.yml | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index ccecef43..d31d4aae 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -35,8 +35,9 @@ jobs: env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} run: | - src/kibot --help-outputs python3-coverage erase + # Create the caches with macros + python3-coverage run -a src/kibot --help-outputs > /dev/null pytest-3 --test_dir output python3-coverage report python3-coverage html -d output/htmlcov diff --git a/Makefile b/Makefile index 5460d589..580eb377 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ test_docker_local: # Run in the same directory to make the __pycache__ valid # Also change the owner of the files to the current user (we run as root like in GitHub) docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \ - /bin/bash -c "flake8 . --count --statistics ; src/kibot --help-outputs ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" + /bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" $(PY_COV) report x-www-browser htmlcov/index.html