@@ -4,6 +4,9 @@ permissions: {}
44
55on :
66 workflow_dispatch :
7+ schedule :
8+ # Run every day at 0:00 GMT (8:00 AM Singapore time)
9+ - cron : ' 0 0 * * *'
710 push :
811 branches :
912 - main
3437 with :
3538 github-token : ${{ secrets.GITHUB_TOKEN }}
3639
40+ build :
41+ name : Build vite-plus packages
42+ runs-on : ubuntu-latest
43+ permissions :
44+ contents : read
45+ packages : read
46+ needs :
47+ - download-previous-rolldown-binaries
48+ steps :
49+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+ - uses : ./.github/actions/clone
51+
52+ - name : Configure Git for access to vite-task
53+ run : git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "https://github.com/"
54+
55+ - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
56+ with :
57+ save-cache : ${{ github.ref_name == 'main' }}
58+ cache-key : e2e-build
59+
60+ - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
61+
62+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
63+ with :
64+ name : rolldown-binaries
65+ path : ./rolldown/packages/rolldown/src
66+ merge-multiple : true
67+
68+ - name : Build with upstream
69+ uses : ./.github/actions/build-upstream
70+ with :
71+ target : x86_64-unknown-linux-gnu
72+
73+ - name : Pack packages into tgz
74+ run : |
75+ pnpm run bootstrap-cli:ci
76+ mkdir -p tmp/tgz
77+ cd packages/core && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
78+ cd packages/test && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
79+ cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
80+ cd packages/global && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
81+ ls -la tmp/tgz
82+
83+ - name : Upload tgz artifacts
84+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
85+ with :
86+ name : vite-plus-packages
87+ path : tmp/tgz/*.tgz
88+ retention-days : 1
89+
3790 e2e-test :
3891 name : ${{ matrix.project.name }} E2E test
3992 env :
@@ -43,16 +96,17 @@ jobs:
4396 contents : read
4497 packages : read
4598 needs :
46- - download-previous-rolldown-binaries
99+ - build
47100 runs-on : ubuntu-latest
101+ timeout-minutes : 10
48102 strategy :
49103 fail-fast : false
50104 matrix :
51105 project :
52106 - name : vibe-dashboard
53107 node-version : 24
54108 command : |
55- pnpm playwright install --with-deps
109+ npx playwright install chromium
56110 # FIXME: Failed to load JS plugin: ./plugins/debugger.js
57111 # vite run ready
58112 vite fmt
65119 # vite run format
66120 # vite run lint:check
67121 # vite run check
68- # pnpm exec playwright install chromium
122+ # npx playwright install chromium
69123 # vite run test
70124 - name : rollipop
71125 node-version : 22
@@ -107,47 +161,22 @@ jobs:
107161 with :
108162 ecosystem-ci-project : ${{ matrix.project.name }}
109163
110- - name : Configure Git for access to vite-task
111- run : git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "https://github.com/"
112-
113- - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
114- with :
115- save-cache : ${{ github.ref_name == 'main' }}
116- cache-key : e2e-test
117-
118- - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
119-
120- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
121- with :
122- name : rolldown-binaries
123- path : ./rolldown/packages/rolldown/src
124- merge-multiple : true
125-
126- - name : Build with upstream
127- uses : ./.github/actions/build-upstream
128- with :
129- target : x86_64-unknown-linux-gnu
130-
131- - name : Build all packages
132- run : pnpm bootstrap-cli:ci
133-
134- - name : Pack packages into tgz
135- run : |
136- mkdir -p tmp/tgz
137- cd packages/core && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
138- cd packages/test && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
139- cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
140- cd packages/global && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
141- ls -la tmp/tgz
142-
143164 - uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
144165 with :
145166 node-version : ${{ matrix.project.node-version }}
146167 package-manager-cache : false
147168
169+ - name : Download vite-plus packages
170+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
171+ with :
172+ name : vite-plus-packages
173+ path : tmp/tgz
174+
148175 - name : Install vite-plus from tgz in ${{ matrix.project.name }}
149176 working-directory : ecosystem-ci/${{ matrix.project.name }}
150177 run : |
178+ # install global CLI first
179+ npm install -g ../../tmp/tgz/voidzero-dev-global-0.0.0.tgz
151180 # avoid the vite migration using the wrong ignore file
152181 rm -f ../.gitignore
153182 node ../patch-project.ts ${{ matrix.project.name }}
@@ -156,3 +185,52 @@ jobs:
156185 - name : Run vite-plus commands in ${{ matrix.project.name }}
157186 working-directory : ecosystem-ci/${{ matrix.project.name }}
158187 run : ${{ matrix.project.command }}
188+
189+ notify-failure :
190+ name : Notify on failure
191+ runs-on : ubuntu-latest
192+ needs : e2e-test
193+ if : ${{ failure() && github.event_name == 'schedule' }}
194+ permissions :
195+ contents : read
196+ issues : write
197+ steps :
198+ - name : Create or update GitHub issue on failure
199+ env :
200+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
201+ GH_REPO : ${{ github.repository }}
202+ run : |
203+ ISSUE_TITLE="E2E Test Scheduled Run Failed"
204+ ISSUE_LABEL="e2e-failure"
205+ RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
206+
207+ # Create label if it doesn't exist
208+ if ! gh label list --json name --jq '.[].name' | grep -q "^${ISSUE_LABEL}$"; then
209+ gh label create "$ISSUE_LABEL" --color "d73a4a" --description "E2E test scheduled run failure"
210+ echo "Created label: $ISSUE_LABEL"
211+ fi
212+
213+ # Search for existing open issue with the label
214+ EXISTING_ISSUE=$(gh issue list --label "$ISSUE_LABEL" --state open --json number --jq '.[0].number')
215+
216+ if [ -z "$EXISTING_ISSUE" ]; then
217+ # Create new issue if none exists
218+ gh issue create \
219+ --title "$ISSUE_TITLE" \
220+ --label "$ISSUE_LABEL" \
221+ --body "The scheduled E2E test run has failed.
222+
223+ **Failed Run:** $RUN_URL
224+ **Time:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
225+
226+ Please investigate the failure and fix any issues."
227+ echo "Created new issue"
228+ else
229+ # Add comment to existing issue
230+ gh issue comment "$EXISTING_ISSUE" \
231+ --body "The scheduled E2E test run has failed again.
232+
233+ **Failed Run:** $RUN_URL
234+ **Time:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
235+ echo "Added comment to issue #$EXISTING_ISSUE"
236+ fi
0 commit comments