Skip to content

Commit

Permalink
job level continue-on-error
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Sep 20, 2023
1 parent 1b1693b commit 3665a20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ jobs:
CONCURRENT: 1 # run all the start_test.sh tests concurrently
run: |
cd dockerfiles/testsuite && ./start_test.sh
- name: Store code coverage artifact (integration)
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -155,6 +154,7 @@ jobs:

job_gocoverage_textfmt:
name: Convert coverage (bin->txt)
continue-on-error: true # never mark the whole CI as failed because of this job
needs: [job_go_test, job_compose_test]
runs-on: ubuntu-latest
steps:
Expand All @@ -166,15 +166,16 @@ jobs:
go-version: '1.20'
cache: false
- name: Convert gocoverage format
continue-on-error: true # the merge might fail if unit ran with a different covermode than integration
run: |
go tool covdata textfmt -i=gocoverage-unit@${{ env.SHA }}/ \
-o gocoverage-unit@${{ env.SHA }}.txt
go tool covdata textfmt -i=gocoverage-integration@${{ env.SHA }}/ \
-o gocoverage-integration@${{ env.SHA }}.txt
go tool covdata textfmt -i=gocoverage-unit@${{ env.SHA }}/,gocoverage-integration@${{ env.SHA }}/ \
-o gocoverage-merged@${{ env.SHA }}.txt
# the merge might fail if unit ran with a different covermode than integration (set vs count vs atomic)
- name: Store code coverage artifact (all, textfmt)
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: gocoverage-all-textfmt@${{ env.SHA }}
Expand All @@ -184,19 +185,22 @@ jobs:
name: Publish coverage (Coveralls)
runs-on: ubuntu-latest
needs: [job_gocoverage_textfmt]
continue-on-error: true # never mark the whole CI as failed because of this job
steps:
- uses: actions/checkout@v3
- uses: benjlevesque/[email protected] # sets env.SHA to the first 7 chars of github.sha
- uses: actions/download-artifact@v3
with:
name: gocoverage-all-textfmt@${{ env.SHA }}
- name: Send coverage to coveralls.io (unit)
if: ${{ always() }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: gocoverage-unit@${{ env.SHA }}.txt
flag-name: unit
parallel: true
- name: Send coverage to coveralls.io (integration)
if: ${{ always() }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: gocoverage-integration@${{ env.SHA }}.txt
Expand All @@ -212,6 +216,7 @@ jobs:
name: Publish coverage (DeepSource)
runs-on: ubuntu-latest
needs: [job_gocoverage_textfmt]
continue-on-error: true # never mark the whole CI as failed because of this job
steps:
- uses: actions/checkout@v3
- uses: benjlevesque/[email protected] # sets env.SHA to the first 7 chars of github.sha
Expand Down

0 comments on commit 3665a20

Please sign in to comment.