From 84b7aa84dcde45d5dd436e288191da5cfd997b95 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 6be0a295a3..1e68ee2ec4 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: ./hnn_core/tests/ + fail_ci_if_error: true + files: ./coverage.xml + flags: unittests + token: ${{ secrets.CODECOV_TOKEN }}