From 62f29b212f28559c0e3133a0aba0e7d29ab4ed36 Mon Sep 17 00:00:00 2001 From: Tristiisch Date: Tue, 1 Oct 2024 01:30:59 +0200 Subject: [PATCH] tests: move coverage folder (#28) --- .coveragerc | 16 ++++++++++++++++ .github/workflows/python.yml | 2 +- .gitignore | 3 ++- Dockerfile | 2 +- auto_update.sh | 9 --------- docker-compose.dev.yml | 4 ++-- 6 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 auto_update.sh diff --git a/.coveragerc b/.coveragerc index aa8f402..50f9a28 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,18 @@ [run] +source = + ./src + ./tests data_file = ./coverage/result + +[xml] +output = ./coverage/coverage.xml + +[json] +output = ./coverage/coverage.json +pretty_print = True + +[report] +; show_missing = True + +[html] +directory = ./coverage/htmlcov diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 397bdd4..3533154 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -290,7 +290,7 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} slug: tristiisch/PyRamid - files: ./coverage/result + files: ./coverage/coverage1.xml fail_ci_if_error: true docker_image_push: diff --git a/.gitignore b/.gitignore index 8de467c..12364ec 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ coverage.xml *.py,cover .hypothesis/ .pytest_cache/ -cover/ +coverage/ # Translations *.mo @@ -166,3 +166,4 @@ logs/* git_info.json !.gitkeep +./.docker diff --git a/Dockerfile b/Dockerfile index c510f7c..cf07ec9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -139,4 +139,4 @@ RUN pip install -e . USER $APP_USER # Run tests -CMD ["pytest", "--cov=pyramid", "tests/", "--cov-config=.coveragerc"] +CMD ["pytest", "--cov=pyramid", "tests/", "--cov-config=.coveragerc", "--cov-report=xml"] diff --git a/auto_update.sh b/auto_update.sh deleted file mode 100644 index f1e7783..0000000 --- a/auto_update.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# Get the directory of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Change the working directory -cd "$DIR" - -docker compose up --pull always -d diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 0f586cd..3b5d0fc 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -3,6 +3,6 @@ services: image: tristiisch/pyramid:latest restart: always volumes: - - ./docker/pyramid/logs:/app/logs - - ./docker/pyramid/songs:/app/songs + - ./.docker/pyramid/logs:/app/logs + - ./.docker/pyramid/songs:/app/songs env_file: .env