Skip to content

Commit 035d0cc

Browse files
piehorinokai
andauthored
chore: use separate GHA job for smoke tests (#393)
* chore: use separate GHA job for smoke tests * chore: upgrade vitest * chore: install deno for smoke tests job * chore: actually run smoke tests in smoke tests job --------- Co-authored-by: Rob Stanford <me@robstanford.com>
1 parent 8c8faa0 commit 035d0cc

File tree

5 files changed

+327
-823
lines changed

5 files changed

+327
-823
lines changed

.github/workflows/run-tests.yml

+43-9
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
echo "version=$RESOLVED_VERSION" >> $GITHUB_OUTPUT
9696
echo "Resolved Next.js version for 'next@${{ matrix.version }}' is '$RESOLVED_VERSION'"
9797
- name: Run Playwright tests
98-
run: npm run e2e:ci -- --shard=${{ matrix.shard }}/4
98+
run: npm run test:ci:e2e -- --shard=${{ matrix.shard }}/4
9999
env:
100100
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
101101
NEXT_VERSION: ${{ matrix.version }}
@@ -137,12 +137,6 @@ jobs:
137137
run: npm ci
138138
- name: 'Build'
139139
run: npm run build
140-
- name: 'Netlify Login'
141-
env:
142-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
143-
run: |
144-
npm i -g netlify-cli
145-
netlify login
146140
- name: Resolve Next.js version
147141
id: resolve-next-version
148142
shell: bash
@@ -172,13 +166,53 @@ jobs:
172166
env:
173167
NEXT_VERSION: ${{ matrix.version }}
174168
NEXT_RESOLVED_VERSION: ${{ steps.resolve-next-version.outputs.version }}
175-
- name: 'Test'
176-
run: npm run test:ci -- --shard=${{ matrix.shard }}/8
169+
- name: 'Unit and integration tests'
170+
run: npm run test:ci:unit-and-integration -- --shard=${{ matrix.shard }}/8
177171
env:
178172
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
179173
NEXT_VERSION: ${{ matrix.version }}
180174
NEXT_RESOLVED_VERSION: ${{ steps.resolve-next-version.outputs.version }}
181175
TEMP: ${{ github.workspace }}/..
176+
177+
smoke:
178+
if: always()
179+
needs: setup
180+
runs-on: ubuntu-latest
181+
strategy:
182+
fail-fast: false
183+
matrix:
184+
version: ${{ fromJson(needs.setup.outputs.matrix) }}
185+
steps:
186+
- uses: actions/checkout@v4
187+
- name: 'Install Node'
188+
uses: actions/setup-node@v4
189+
with:
190+
node-version: '18.x'
191+
cache: 'npm'
192+
cache-dependency-path: '**/package-lock.json'
193+
- name: setup pnpm/yarn
194+
run: corepack enable
195+
shell: bash
196+
- name: Install Deno
197+
uses: denoland/setup-deno@v1
198+
with:
199+
# Should match the `DENO_VERSION_RANGE` from https://github.com/netlify/edge-bundler/blob/main/node/bridge.ts#L17
200+
deno-version: v1.37.0
201+
- name: 'Install dependencies'
202+
run: npm ci
203+
- name: 'Build'
204+
run: npm run build
205+
- name: 'Netlify Login'
206+
env:
207+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
208+
run: |
209+
npm i -g netlify-cli
210+
netlify login
211+
- name: 'Smoke tests'
212+
run: npm run test:ci:smoke
213+
env:
214+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
215+
182216
merge-reports:
183217
if: always()
184218
needs: [setup,e2e]

0 commit comments

Comments
 (0)