From 0346dbf5d69a190491d83431e6d4209abc2b61ae Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:20:50 -0400 Subject: [PATCH] ci: update to use codecov action to upload coverage --- .github/workflows/unit_tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 6be0a295a..48f0b4b91 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -47,7 +47,11 @@ jobs: shell: bash -el {0} run: | python -m pytest . --cov=hnn_core hnn_core/tests/ --cov-report=xml - - name: Upload code coverage - shell: bash -el {0} - run: | - bash <(curl -s https://codecov.io/bash) -f ./coverage.xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + directory: ./ + fail_ci_if_error: true + files: ./coverage.xml + flags: unittests + token: ${{ secrets.CODECOV_TOKEN }}