From f2c6de383244db7baa61047b7bea3d5819d4b0a1 Mon Sep 17 00:00:00 2001 From: GitBib <15717621+GitBib@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:40:03 +0300 Subject: [PATCH] Update Codecov action and pytest configuration Updated the Codecov action in the GitHub workflows to include environment variables and specified coverage files. Additionally, the pytest command in the Makefile now generates an XML report for Codecov. --- .github/workflows/tests.yml | 2 ++ Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6dc6e8e..bdd11c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,6 +41,8 @@ jobs: uses: codecov/codecov-action@v4 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} with: + env_vars: OS,PYTHON + files: ./coverage.xml verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index e90302e..66bdc97 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ test: $(TEST_FILE) $(TEST_TWO_FILE) @mkvmerge -J $(TEST_FILE) @echo "Running mkvmerge -J $(TEST_TWO_FILE)..." @mkvmerge -J $(TEST_TWO_FILE) - pytest --cov=pymkv $(TEST_DIR) + pytest --cov=pymkv $(TEST_DIR) --cov-report=xml $(TEST_FILE): @if [ ! -f $(TEST_FILE) ]; then \