Skip to content

Commit

Permalink
Fail job if leak was detected (java-native-access#126)
Browse files Browse the repository at this point in the history
Motivation:

We should fail the build when a leak was detected

Modifications:

Add extra step which will fail the job when a leak was found

Result:

Leaks will fail the job
  • Loading branch information
normanmaurer authored Dec 22, 2020
1 parent 30c3593 commit 5a50e91
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ jobs:

- name: Build project with leak detection
if: ${{ github.event_name == 'pull_request' }}
run: docker-compose -f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build-leak
run: docker-compose -f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build-leak | tee build-leak.output

- name: Checking for detected leak
if: ${{ github.event_name == 'pull_request' }}
run: |
if grep -q 'LEAK:' build-leak.output ; then
echo "Leak detected, please inspect build log"
exit 1
else
echo "No Leak detected"
fi
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
Expand Down

0 comments on commit 5a50e91

Please sign in to comment.