github.com/mithrandie/csvq@v1.18.1/.github/workflows/coverage_profile_uploading.yml (about) 1 name: Coverage profile uploading 2 3 on: 4 workflow_run: 5 workflows: 6 - Test 7 types: 8 - completed 9 branches: 10 - master 11 12 jobs: 13 upload: 14 runs-on: ubuntu-latest 15 if: ${{ github.event.workflow_run.conclusion == 'success' }} 16 17 steps: 18 - uses: actions/checkout@v3 19 20 - name: Set up Go 21 uses: actions/setup-go@v3 22 with: 23 go-version: 1.x 24 25 - name: Create Coverage Profile 26 run: go test -coverprofile=coverage.txt -covermode=atomic ./... 27 28 - name: Upload Coverage Profile 29 uses: codecov/codecov-action@v2 30 with: 31 token: ${{ secrets.CODECOV_TOKEN }} 32 files: coverage.txt 33 fail_ci_if_error: true 34 verbose: false 35 fail: 36 runs-on: ubuntu-latest 37 if: ${{ github.event.workflow_run.conclusion == 'failure' }} 38 39 steps: 40 - run: | 41 echo '::error::Testing was failed' 42 exit 1