Skip to content

Commit 27e7de6

Browse files
committed
feat(ci): 加 Job Summary(pytest 結果 markdown 表)+ 升 Node.js 24
CI/CD step 5 level B: 1. 修 Node.js 20 deprecation 警告 — workflow 層級加 env `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true`(GH 2026-06-02 強制升 24) 2. 加 pytest `--junitxml=junit/<site>.xml` 產 JUnit XML 3. 加 `test-summary/action@v2` step — 把 JUnit XML 轉 markdown 表格寫到 `$GITHUB_STEP_SUMMARY`,GH run 頁面直接看 pass/fail 詳情,不用下載 artifact 兩個 workflow 都套(p0.yml + full-regression.yml)。 `if: always()` 確保 fail 路徑也 publish summary。
1 parent 9c34896 commit 27e7de6

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/full-regression.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ concurrency:
1414
group: full-regression-${{ github.ref }}
1515
cancel-in-progress: true
1616

17+
# 強制 actions 用 Node.js 24(2026-06-02 GH 強制升 24;提前消滅 deprecation 警告)
18+
env:
19+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
20+
1721
jobs:
1822
full-regression:
1923
name: Full Regression (${{ matrix.site }})
@@ -68,7 +72,17 @@ jobs:
6872
SITE_RD_PASSWORD: ${{ secrets.SITE_RD_PASSWORD }}
6973
run: |
7074
# 跑該 site 整個目錄(含 P0 + 全 feature);--reruns 1 處理 flaky;--tb=short 縮短 log
71-
pytest tests/${{ matrix.site }}/ --reruns 1 --tb=short
75+
pytest tests/${{ matrix.site }}/ \
76+
--reruns 1 \
77+
--tb=short \
78+
--junitxml=junit/${{ matrix.site }}.xml
79+
80+
# 把 JUnit XML 轉成 markdown 表格寫到 Job Summary
81+
- name: Publish Test Summary
82+
if: always()
83+
uses: test-summary/action@v2
84+
with:
85+
paths: "junit/${{ matrix.site }}.xml"
7286

7387
- name: Upload HTML report
7488
if: always()

.github/workflows/p0.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ concurrency:
1616
group: p0-${{ github.ref }}
1717
cancel-in-progress: true
1818

19+
# 強制 actions 用 Node.js 24(2026-06-02 GH 強制升 24;提前消滅 deprecation 警告)
20+
env:
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
22+
1923
jobs:
2024
p0-smoke:
2125
name: P0 Smoke (${{ matrix.site }})
@@ -71,7 +75,18 @@ jobs:
7175
SITE_RD_USERNAME: ${{ secrets.SITE_RD_USERNAME }}
7276
SITE_RD_PASSWORD: ${{ secrets.SITE_RD_PASSWORD }}
7377
run: |
74-
pytest tests/${{ matrix.site }}/test_p0_smoke.py -m p0 --reruns 1 --tb=short
78+
pytest tests/${{ matrix.site }}/test_p0_smoke.py \
79+
-m p0 \
80+
--reruns 1 \
81+
--tb=short \
82+
--junitxml=junit/${{ matrix.site }}.xml
83+
84+
# 把 JUnit XML 轉成 markdown 表格寫到 Job Summary(GH run 頁面直接看,不用下載 artifact)
85+
- name: Publish Test Summary
86+
if: always()
87+
uses: test-summary/action@v2
88+
with:
89+
paths: "junit/${{ matrix.site }}.xml"
7590

7691
# 永遠 upload 報告(成功或失敗都可下載 review);artifact 名要含 site 避免衝突
7792
- name: Upload HTML report

0 commit comments

Comments
 (0)