From 4eb6b9641c463b97db916950a30d2e941dcacc6d Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Mon, 6 May 2024 17:07:01 -0400 Subject: [PATCH 1/3] ci: Limit test to one file to debug codecov issue. --- .github/workflows/unit_tests.yml | 2 +- .github/workflows/windows_unit_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 48f0b4b91..b87d7eeb2 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -46,7 +46,7 @@ jobs: - name: Test with pytest shell: bash -el {0} run: | - python -m pytest . --cov=hnn_core hnn_core/tests/ --cov-report=xml + python -m pytest ./hnn_core/tests/test_io.py --cov=hnn_core --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/windows_unit_tests.yml b/.github/workflows/windows_unit_tests.yml index 4425714f8..d6ef3f637 100644 --- a/.github/workflows/windows_unit_tests.yml +++ b/.github/workflows/windows_unit_tests.yml @@ -42,4 +42,4 @@ jobs: - name: Test with pytest shell: cmd run: | - python -m pytest . --cov=hnn_core hnn_core/tests/ --cov-report=xml + python -m pytest ./hnn_core/tests/test_io.py --cov=hnn_core --cov-report=xml From 9a32e3a3497bbe1a793751a8b2838efa8a88677e Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Mon, 6 May 2024 17:32:09 -0400 Subject: [PATCH 2/3] ci: Change codecov action setting fail_ci_if_error = false --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index b87d7eeb2..2aa9ea9e0 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -51,7 +51,7 @@ jobs: uses: codecov/codecov-action@v4 with: directory: ./ - fail_ci_if_error: true + fail_ci_if_error: false files: ./coverage.xml flags: unittests token: ${{ secrets.CODECOV_TOKEN }} From c72faf6672616dbbf627671a49c8062815c5117b Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Mon, 6 May 2024 17:46:40 -0400 Subject: [PATCH 3/3] ci: Revert to bash implementation --- .github/workflows/unit_tests.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 2aa9ea9e0..a933b23bf 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -48,10 +48,6 @@ jobs: run: | python -m pytest ./hnn_core/tests/test_io.py --cov=hnn_core --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - directory: ./ - fail_ci_if_error: false - files: ./coverage.xml - flags: unittests - token: ${{ secrets.CODECOV_TOKEN }} + shell: bash -el {0} + run: | + bash <(curl -s https://codecov.io/bash) -f ./coverage.xml