Skip to content

Commit 1a0167e

Browse files
authored
Merge pull request #3322 from cesanta/tests
fix error logs not uploading on test failure
2 parents 4b0b93d + 6ea3b98 commit 1a0167e

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

.github/workflows/nightly.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ jobs:
4141
with:
4242
ssh-private-key: ${{ secrets.HEALTH_TESTS_SSH_KEY }}
4343
- run: sudo apt -y update ; sudo apt -y install libmbedtls-dev libwolfssl-dev && test/setup_mqtt_server.sh && make -C test ${{ matrix.target }} > log
44-
- run: test/health.awk < log > json
45-
- run: scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/linux_${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
44+
- if: success() || failure()
45+
run: |
46+
cat log
47+
test/health.awk < log > json
48+
scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/linux_${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
4649
mip:
4750
runs-on: ubuntu-latest
4851
strategy:
@@ -67,8 +70,11 @@ jobs:
6770
with:
6871
ssh-private-key: ${{ secrets.HEALTH_TESTS_SSH_KEY }}
6972
- run: if [ "${{ matrix.target }}" == "mip_tap_test" ]; then ./test/setup_ga_network.sh ; fi && sudo apt -y update ; sudo apt -y install libmbedtls-dev libwolfssl-dev && make -C test ${{ matrix.target }} IPV6=0 > log
70-
- run: test/health.awk < log > json
71-
- run: scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_$(date +"%Y%m%d").json"
73+
- if: success() || failure()
74+
run: |
75+
cat log
76+
test/health.awk < log > json
77+
scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_$(date +"%Y%m%d").json"
7278
7379
mip89:
7480
runs-on: ubuntu-latest
@@ -168,8 +174,11 @@ jobs:
168174
- run: brew install mbedtls wolfssl mosquitto gawk # jq openssl already pre-installed
169175
- run: /opt/homebrew/opt/mosquitto/sbin/mosquitto -c /Users/runner/work/mongoose/mongoose/test/mosquitto.conf.macos &
170176
- run: make -C test test ASAN_OPTIONS= MBEDTLS=$(echo $(brew --cellar)/mbedtls*/*) OPENSSL=$(echo $(brew --cellar)/openssl*/*) WOLFSSL=$(echo $(brew --cellar)/wolfssl*/*) > log
171-
- run: test/health.awk < log > json
172-
- run: scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/macos_test_cc_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
177+
- if: success() || failure()
178+
run: |
179+
cat log
180+
test/health.awk < log > json
181+
scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/macos_test_cc_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
173182
174183
windows:
175184
runs-on: ubuntu-latest
@@ -194,8 +203,11 @@ jobs:
194203
with:
195204
ssh-private-key: ${{ secrets.HEALTH_TESTS_SSH_KEY }}
196205
- run: ./test/setup_mqtt_server.sh && make -C test ${{ matrix.target }} > log
197-
- run: test/health.awk < log > json
198-
- run: scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/windows_${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
206+
- if: success() || failure()
207+
run: |
208+
cat log
209+
test/health.awk < log > json
210+
scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/windows_${{ matrix.target }}_${{ matrix.cc }}_${{ matrix.ssl }}_${{ matrix.select }}_$(date +"%Y%m%d").json"
199211
200212
arm:
201213
runs-on: ubuntu-latest
@@ -232,8 +244,11 @@ jobs:
232244
ssh-private-key: ${{ secrets.HEALTH_TESTS_SSH_KEY }}
233245
- run: sudo apt -y install libpcap-dev
234246
- run: make -C test tutorials CFLAGS_EXTRA="${{ matrix.ssl }}" > log
235-
- run: test/health.awk < log > json
236-
- run: scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/tutorials_${{ matrix.ssl }}_$(date +"%Y%m%d").json"
247+
- if: success() || failure()
248+
run: |
249+
cat log
250+
test/health.awk < log > json
251+
scp -o "StrictHostKeyChecking=no" json "root@176.9.217.245:/data/downloads/health/tutorials_${{ matrix.ssl }}_$(date +"%Y%m%d").json"
237252
- run: make -C test clean_tutorials
238253

239254
tutorials_win:

0 commit comments

Comments
 (0)