From 2f6dd6e5ed055dea852158947ea6f83079498bcd Mon Sep 17 00:00:00 2001 From: Samuel Date: Wed, 18 Nov 2020 17:47:14 -0600 Subject: [PATCH] Integrate codecov.io. By @samuel-w (#719) --- .coveragerc | 4 ++++ .github/workflows/main.yml | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..9e0c0f7f --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = tests/* +source=vorta +relative_files=true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d6dce28..60c2967a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - name: Install Vorta run: | pip install . + pip install coverage pip install borgbackup pip install -r requirements.d/dev.txt # - name: Setup tmate session @@ -53,12 +54,15 @@ jobs: export $(dbus-launch) (herbstluftwm) & sleep 3 - pytest + coverage run -m pytest - name: Test with pytest (macOS) if: runner.os == 'macOS' run: | - pytest - + coverage run -m pytest + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} lint: runs-on: ubuntu-latest steps: