@@ -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 :
4396 contents : read
4497 packages : read
4598 needs :
46- - download-previous-rolldown-binaries
99+ - build
47100 runs-on : ubuntu-latest
48101 timeout-minutes : 10
49102 strategy :
66119 # vite run format
67120 # vite run lint:check
68121 # vite run check
69- # pnpm exec playwright install chromium
122+ # npx playwright install chromium
70123 # vite run test
71124 - name : rollipop
72125 node-version : 22
@@ -110,47 +163,22 @@ jobs:
110163 with :
111164 ecosystem-ci-project : ${{ matrix.project.name }}
112165
113- - name : Configure Git for access to vite-task
114- run : git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "https://github.com/"
115-
116- - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
117- with :
118- save-cache : ${{ github.ref_name == 'main' }}
119- cache-key : e2e-test
120-
121- - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
122-
123- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
124- with :
125- name : rolldown-binaries
126- path : ./rolldown/packages/rolldown/src
127- merge-multiple : true
128-
129- - name : Build with upstream
130- uses : ./.github/actions/build-upstream
131- with :
132- target : x86_64-unknown-linux-gnu
133-
134- - name : Build all packages
135- run : pnpm bootstrap-cli:ci
136-
137- - name : Pack packages into tgz
138- run : |
139- mkdir -p tmp/tgz
140- cd packages/core && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
141- cd packages/test && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
142- cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
143- cd packages/global && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
144- ls -la tmp/tgz
145-
146166 - uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
147167 with :
148168 node-version : ${{ matrix.project.node-version }}
149169 package-manager-cache : false
150170
171+ - name : Download vite-plus packages
172+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
173+ with :
174+ name : vite-plus-packages
175+ path : tmp/tgz
176+
151177 - name : Install vite-plus from tgz in ${{ matrix.project.name }}
152178 working-directory : ecosystem-ci/${{ matrix.project.name }}
153179 run : |
180+ # install global CLI first
181+ npm install -g ../../tmp/tgz/voidzero-dev-global-0.0.0.tgz
154182 # avoid the vite migration using the wrong ignore file
155183 rm -f ../.gitignore
156184 node ../patch-project.ts ${{ matrix.project.name }}
@@ -159,3 +187,52 @@ jobs:
159187 - name : Run vite-plus commands in ${{ matrix.project.name }}
160188 working-directory : ecosystem-ci/${{ matrix.project.name }}
161189 run : ${{ matrix.project.command }}
190+
191+ notify-failure :
192+ name : Notify on failure
193+ runs-on : ubuntu-latest
194+ needs : e2e-test
195+ if : ${{ failure() && github.event_name == 'schedule' }}
196+ permissions :
197+ contents : read
198+ issues : write
199+ steps :
200+ - name : Create or update GitHub issue on failure
201+ env :
202+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
203+ GH_REPO : ${{ github.repository }}
204+ run : |
205+ ISSUE_TITLE="E2E Test Scheduled Run Failed"
206+ ISSUE_LABEL="e2e-failure"
207+ RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
208+
209+ # Create label if it doesn't exist
210+ if ! gh label list --json name --jq '.[].name' | grep -q "^${ISSUE_LABEL}$"; then
211+ gh label create "$ISSUE_LABEL" --color "d73a4a" --description "E2E test scheduled run failure"
212+ echo "Created label: $ISSUE_LABEL"
213+ fi
214+
215+ # Search for existing open issue with the label
216+ EXISTING_ISSUE=$(gh issue list --label "$ISSUE_LABEL" --state open --json number --jq '.[0].number')
217+
218+ if [ -z "$EXISTING_ISSUE" ]; then
219+ # Create new issue if none exists
220+ gh issue create \
221+ --title "$ISSUE_TITLE" \
222+ --label "$ISSUE_LABEL" \
223+ --body "The scheduled E2E test run has failed.
224+
225+ **Failed Run:** $RUN_URL
226+ **Time:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
227+
228+ Please investigate the failure and fix any issues."
229+ echo "Created new issue"
230+ else
231+ # Add comment to existing issue
232+ gh issue comment "$EXISTING_ISSUE" \
233+ --body "The scheduled E2E test run has failed again.
234+
235+ **Failed Run:** $RUN_URL
236+ **Time:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
237+ echo "Added comment to issue #$EXISTING_ISSUE"
238+ fi
0 commit comments