From 7d4970be0fb2467649a50170cdb5891b19189468 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Sat, 27 Apr 2024 21:16:10 -0400 Subject: [PATCH] Add Codecov support --- .coveragerc | 4 ++++ .github/workflows/run_test.yml | 12 +++++++++++- .gitignore | 3 ++- README.md | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..92496bf --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[report] +include = font_collector/* +exclude_lines = + @abstractmethod \ No newline at end of file diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index ddfd55c..01147b8 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -46,10 +46,20 @@ jobs: # We need to conserve mkvtoolnix in the PATH env variable. # From https://stackoverflow.com/a/73981698/15835974 - - name: Install pytest + - name: Install pytest and pytest-cov run: | pip install pytest + pip install pytest-cov - name: Run tests run: | pytest + + - name: Generate coverage report + run: | + pytest --cov=./ --cov-report=xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7ec5b43..82f2cf9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build/ dist/ .idea/ .vscode/ -venv/ \ No newline at end of file +venv/ +.coverage \ No newline at end of file diff --git a/README.md b/README.md index e79fe8e..2a9a207 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # FontCollector +![Codecov](https://app.codecov.io/github/moi15moi/FontCollector) + FontCollector for Advanced SubStation Alpha file. This tool allows to recover and/or mux the fonts necessary in an mkv. ## Installation