Skip to content

Commit 04a95b8

Browse files
committed
GitHub: upload logs on failure
1 parent 02a16b5 commit 04a95b8

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/main.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424

2525
strategy:
2626
matrix:
27-
node_version: [16.x]
28-
os: [ubuntu-latest, windows-latest, macOS-latest]
27+
node_version: [ 16.x ]
28+
os: [ ubuntu-latest, windows-latest, macOS-latest ]
2929

3030
steps:
3131
- name: git checkout
@@ -63,8 +63,8 @@ jobs:
6363

6464
strategy:
6565
matrix:
66-
go_version: [1.18.x]
67-
os: [ubuntu-latest, windows-latest, macOS-latest]
66+
go_version: [ 1.18.x ]
67+
os: [ ubuntu-latest, windows-latest, macOS-latest ]
6868

6969
steps:
7070
- name: git checkout
@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: build backend binary
8686
run: make build
87-
87+
8888
- name: build CLI binaries
8989
run: make go-install-cli
9090

@@ -244,6 +244,19 @@ jobs:
244244
- name: run check
245245
run: make itest
246246

247+
- name: Zip log files on failure
248+
if: ${{ failure() }}
249+
timeout-minutes: 5
250+
run: 7z a logs-itest.zip itest/**/*.log
251+
252+
- name: Upload log files on failure
253+
uses: actions/upload-artifact@v3
254+
if: ${{ failure() }}
255+
with:
256+
name: logs-itest
257+
path: logs-itest.zip
258+
retention-days: 5
259+
247260
########################
248261
# check PR updates release notes
249262
########################
@@ -256,4 +269,4 @@ jobs:
256269
uses: actions/checkout@v3
257270

258271
- name: release notes check
259-
run: scripts/check-release-notes.sh
272+
run: scripts/check-release-notes.sh

0 commit comments

Comments
 (0)