1919 runs-on : ubuntu-latest
2020 timeout-minutes : 60
2121 container :
22- image : dragonos/dragonos-dev:v1.16
22+ image : dragonos/dragonos-dev:v1.17
2323 options : --privileged -v /dev:/dev
2424 steps :
2525 - name : Checkout DragonOS code
@@ -32,15 +32,15 @@ jobs:
3232 make -j$(nproc) all
3333
3434 - name : Run syscall test
35+ id : test-syscall
3536 shell : bash -ileo pipefail {0}
36- continue-on-error : true
3737 env :
3838 DISK_SAVE_MODE : " 1"
3939 run : |
4040 make test-syscall
4141
4242 - name : Upload test results
43- if : github.repository == 'DragonOS-Community/DragonOS'
43+ if : always() && github.repository == 'DragonOS-Community/DragonOS'
4444 shell : bash -ileo pipefail {0}
4545 env :
4646 API_KEY : ${{ secrets.CI_DASHBOARD_UPLOAD_API_KEY }}
@@ -69,22 +69,28 @@ jobs:
6969 BRANCH_NAME="${{ github.head_ref }}"
7070 fi
7171
72- # 检查API_KEY是否存在
73- if [ -z "$API_KEY" ]; then
74- echo "警告: CI_DASHBOARD_UPLOAD_API_KEY secret未设置,跳过上传"
75- exit 0
76- fi
77-
7872 # 检查日志文件是否存在
7973 if [ ! -f "serial_opt.txt" ]; then
8074 echo "警告: serial_opt.txt文件不存在,跳过上传"
8175 exit 0
8276 fi
8377
84- # 上传测试结果
85- python3 tools/test-upload/parse_and_upload.py \
86- serial_opt.txt \
87- "$API_URL" \
88- --branch "$BRANCH_NAME" \
89- --commit "$COMMIT_ID" \
90- --test-type "gvisor"
78+ # 检查API_KEY是否存在,如果不存在则使用dry-run模式
79+ if [ -z "$API_KEY" ]; then
80+ echo "警告: CI_DASHBOARD_UPLOAD_API_KEY secret未设置,使用dry-run模式"
81+ python3 tools/test-upload/parse_and_upload.py \
82+ serial_opt.txt \
83+ "$API_URL" \
84+ --branch "$BRANCH_NAME" \
85+ --commit "$COMMIT_ID" \
86+ --test-type "gvisor" \
87+ --dry-run
88+ else
89+ # 上传测试结果
90+ python3 tools/test-upload/parse_and_upload.py \
91+ serial_opt.txt \
92+ "$API_URL" \
93+ --branch "$BRANCH_NAME" \
94+ --commit "$COMMIT_ID" \
95+ --test-type "gvisor"
96+ fi
0 commit comments