From 0db83abfe741b6d8e6e92660ed89532fa1a3da38 Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:27:46 +0200 Subject: [PATCH] fix: use txtar flag Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- .github/workflows/test_template.yml | 33 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml index dc4ea7bf6e0..512d7a94b1a 100644 --- a/.github/workflows/test_template.yml +++ b/.github/workflows/test_template.yml @@ -46,21 +46,32 @@ jobs: (set +x; echo 'txtar coverage results:') go tool covdata percent -i=$TXTARCOVERDIR - # Merge and print combined coverage results - go tool covdata merge -v 1 -i="$GOCOVERDIR,$TXTARCOVERDIR" -o $COVERDIR - (set +x; echo 'final coverage results:') - go tool covdata percent -i=$COVERDIR - # Generate final coverage output - go tool covdata textfmt -v 1 -i=$COVERDIR -o coverage.out || touch coverage.out + go tool covdata textfmt -v 1 -i=$GOCOVERDIR -o gocoverage.out + go tool covdata textfmt -v 1 -i=$TXTARCOVERDIR -o txtarcoverage.out - - name: Upload coverage to Codecov + - name: Upload go coverage to Codecov + working-directory: ${{ inputs.modulepath }} uses: codecov/codecov-action@v4 with: - token: ${{ secrets.codecov-token }} - verbose: true - fail_ci_if_error: true - flags: ${{ inputs.modulepath }} + disable_search: true + fail_ci_if_error: true + file: ./gocoverage.out + flags: ${{ inputs.modulepath }} + token: ${{ secrets.codecov-token }} + verbose: true + + - name: Upload txtar coverage to Codecov + working-directory: ${{ inputs.modulepath }} + uses: codecov/codecov-action@v4 + with: + disable_search: true + fail_ci_if_error: true + file: ./txtarcoverage.out + flags: ${{ inputs.modulepath }}/txtar + token: ${{ secrets.codecov-token }} + verbose: true + # TODO: We have to fix race conditions before running this job # test-with-race: # runs-on: ubuntu-latest