CI: Github Actions: do not show VTest failures if build failed

this is mostly cleanup, issue is minor. If build failed, VTest execution
tried to be performed as well as VTest result show. This change ignores
those steps if build failed.
This commit is contained in:
Ilya Shipitsin 2021-12-25 13:53:04 +05:00 committed by Willy Tarreau
parent b4ff6f4ae9
commit 2ef4c7c843

View File

@ -87,6 +87,7 @@ jobs:
ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/"
sudo make install sudo make install
- name: Show HAProxy version - name: Show HAProxy version
if: ${{ !failure() }}
id: show-version id: show-version
run: | run: |
echo "::group::Show dynamic libraries." echo "::group::Show dynamic libraries."
@ -101,17 +102,19 @@ jobs:
haproxy -vv haproxy -vv
echo "::set-output name=version::$(haproxy -v |awk 'NR==1{print $3}')" echo "::set-output name=version::$(haproxy -v |awk 'NR==1{print $3}')"
- name: Install problem matcher for VTest - name: Install problem matcher for VTest
if: ${{ !failure() }}
# This allows one to more easily see which tests fail. # This allows one to more easily see which tests fail.
run: echo "::add-matcher::.github/vtest.json" run: echo "::add-matcher::.github/vtest.json"
- name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }} - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
if: ${{ !failure() }}
id: vtest id: vtest
run: | run: |
# This is required for macOS which does not actually allow to increase # This is required for macOS which does not actually allow to increase
# the '-n' soft limit to the hard limit, thus failing to run. # the '-n' soft limit to the hard limit, thus failing to run.
ulimit -n 5000 ulimit -n 5000
make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
- name: Show results - name: Show VTest results
if: ${{ failure() }} if: ${{ failure() && steps.vtest.outcome == 'failure' }}
run: | run: |
for folder in ${TMPDIR}/haregtests-*/vtc.*; do for folder in ${TMPDIR}/haregtests-*/vtc.*; do
printf "::group::" printf "::group::"