Skip to content

Commit

Permalink
Report to coveralls only if integration tests passed
Browse files Browse the repository at this point in the history
The coverage report makes sense only when all tests passed.
When a test fails - the pipeline tries to report to coveralls,
but as long as tests are not fixed - this is not something of
interest, and it creates just an additional failure.

Signed-off-by: Mark Kemel <[email protected]>
  • Loading branch information
mkemel authored and mwperina committed Oct 18, 2024
1 parent 0e8c2df commit 164afb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
cd ..
- name: Run integration tests
id: run-tests
run: |
cd tests
tmt run -v \
Expand Down Expand Up @@ -147,12 +148,13 @@ jobs:
path: '/var/tmp/merged.info'

- name: Prepare the coverage report for coveralls
if: always()
id: prepare-coveralls-report
if: steps.run-tests.outcome == 'success'
run: |
sed 's/\/var\/tmp\/bluechi-coverage\/src/src/' /var/tmp/merged.info > /var/tmp/coveralls.info
- name: Report to Coveralls
if: always()
if: steps.prepare-coveralls-report.outcome == 'success'
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 164afb1

Please sign in to comment.