From 2ddfaa7c982c7677b0cd801bcbb9c1468549d562 Mon Sep 17 00:00:00 2001 From: John Long Date: Thu, 5 Jan 2023 17:02:54 -0500 Subject: [PATCH 1/5] Add Coverage.jl as test dependency --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index f1a521d..b629494 100644 --- a/Project.toml +++ b/Project.toml @@ -9,6 +9,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037" [targets] test = ["Test"] From 208286eb9cdcccafaf3c7888e1f3c4f2977e4a97 Mon Sep 17 00:00:00 2001 From: John Long Date: Thu, 5 Jan 2023 17:03:11 -0500 Subject: [PATCH 2/5] Initial setup for Codecov support --- .github/workflows/CI.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c5066e4..75af5af 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -41,6 +41,10 @@ jobs: - name: "Confirm Number of Threads" run: julia -e 'println(Threads.nthreads())' - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + # remove runtest with single step that handles coverage as well + - name: "Run Tests and Get Code Coverage" + run: julia --project=. -e "using Pkg; Pkg.test(;coverage=true)" + - name: "Send to Codecov" + uses: "codecov/codecov-action@v3" with: - annotate: true \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From bd88cecdae27ad7cce809e84890df6d839ae3cb5 Mon Sep 17 00:00:00 2001 From: John Long Date: Tue, 10 Jan 2023 18:00:09 -0500 Subject: [PATCH 3/5] Initial codecov configuration, added ability to only submit to codecov on first multithreaded unit test run --- .github/workflows/CI.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 75af5af..cb234ca 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -41,10 +41,12 @@ jobs: - name: "Confirm Number of Threads" run: julia -e 'println(Threads.nthreads())' - uses: julia-actions/julia-buildpkg@v1 - # remove runtest with single step that handles coverage as well + # Only get code coverage and tests ONCE - name: "Run Tests and Get Code Coverage" + if: ${{matrix.julia-num-threads == 2}} run: julia --project=. -e "using Pkg; Pkg.test(;coverage=true)" - name: "Send to Codecov" + if: ${{matrix.julia-num-threads == 2}} uses: "codecov/codecov-action@v3" with: token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From b4001498a7214d15b281b00ef32a1ffb3afe3e66 Mon Sep 17 00:00:00 2001 From: John Long Date: Wed, 11 Jan 2023 10:40:38 -0500 Subject: [PATCH 4/5] Set rule so code coverage is applied on 8 thread test --- .github/workflows/CI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index cb234ca..f25f65e 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -43,10 +43,10 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 # Only get code coverage and tests ONCE - name: "Run Tests and Get Code Coverage" - if: ${{matrix.julia-num-threads == 2}} + if: ${{matrix.julia-num-threads == 8}} run: julia --project=. -e "using Pkg; Pkg.test(;coverage=true)" - name: "Send to Codecov" - if: ${{matrix.julia-num-threads == 2}} + if: ${{matrix.julia-num-threads == 8}} uses: "codecov/codecov-action@v3" with: token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From d532e05f9a1bc502e3b40269efe1dfe4abbb4d5d Mon Sep 17 00:00:00 2001 From: John Long Date: Wed, 11 Jan 2023 10:52:58 -0500 Subject: [PATCH 5/5] Send the latest code coverage files on the 8 thread test to codecov --- .github/workflows/CI.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index f25f65e..812f5d4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -43,7 +43,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 # Only get code coverage and tests ONCE - name: "Run Tests and Get Code Coverage" - if: ${{matrix.julia-num-threads == 8}} run: julia --project=. -e "using Pkg; Pkg.test(;coverage=true)" - name: "Send to Codecov" if: ${{matrix.julia-num-threads == 8}}