diff options
author | Filip Skokan <panva.ip@gmail.com> | 2023-02-25 20:23:10 +0100 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2023-03-14 08:15:33 +0100 |
commit | 36c48eab312572c17ab2ec67e20d1b8aa34a303a (patch) | |
tree | 05a7c471dbdbecf35871026226d2937000a88ced | |
parent | 12a561875b31b378f203b32af351a28b9a9127a6 (diff) | |
download | node-new-36c48eab312572c17ab2ec67e20d1b8aa34a303a.tar.gz |
tools: add daily WPT Report workflow step summary
PR-URL: https://github.com/nodejs/node/pull/46763
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
-rw-r--r-- | .github/workflows/daily-wpt-fyi.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 1372632750..14a6e984c5 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -134,11 +134,21 @@ jobs: working-directory: out/wpt run: | gzip wptreport.json + echo "## Node.js ${{ steps.setup-node.outputs.node-version }}" >> $GITHUB_STEP_SUMMARY for WPT_FYI_ENDPOINT in "https://wpt.fyi/api/results/upload" "https://staging.wpt.fyi/api/results/upload" do - curl \ + response=$(curl -sS \ -u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \ -F "result_file=@wptreport.json.gz" \ -F "labels=master" \ - $WPT_FYI_ENDPOINT + $WPT_FYI_ENDPOINT) + + if [[ $response =~ Task\ ([0-9]+)\ added\ to\ queue ]]; then + run_id=${BASH_REMATCH[1]} + origin=${WPT_FYI_ENDPOINT%/api/results/upload} + + echo "" >> $GITHUB_STEP_SUMMARY + echo "Run ID [$run_id]($origin/api/runs/$run_id) added to the processor queue at $origin" >> $GITHUB_STEP_SUMMARY + echo "- [View on the ${origin:8} dashboard]($origin/results?run_id=$run_id)" >> $GITHUB_STEP_SUMMARY + fi done |