File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 1414 default : 3
1515
1616jobs :
17+ prepare-shards :
18+ runs-on : ubuntu-latest
19+ outputs :
20+ shard-array : ${{ steps.generate-shards.outputs.shard-array }}
21+ steps :
22+ - name : Generate shard array
23+ id : generate-shards
24+ run : |
25+ shards=$(seq 1 ${{ inputs.shard-total }} | jq -s 'map(tonumber)')
26+ echo "shard-array=$shards" >> $GITHUB_OUTPUT
27+
1728 test :
29+ needs : prepare-shards
1830 runs-on : ubuntu-latest
1931 strategy :
2032 matrix :
2133 include : ${{ fromJson(inputs.matrix-include) }}
22- shard : [1, 2, 3]
34+ shard : ${{ fromJson(needs.prepare-shards.outputs.shard-array) }}
2335 name : Test ${{ matrix.locale }} (Shard ${{ matrix.shard }})
2436 steps :
2537 - name : Checkout code
3749 vercel_org_id : ${{ secrets.VERCEL_ORG_ID }}
3850 vercel_token : ${{ secrets.VERCEL_TOKEN }}
3951
40- - name : Run E2E Tests
52+ - uses : ./.github/actions/vercel-build
53+ with :
54+ environment : production
55+ prodFlag : --prod
56+ vercel_project_id : ${{ secrets[matrix.secret_project_id] }}
57+ vercel_org_id : ${{ secrets.VERCEL_ORG_ID }}
58+ vercel_token : ${{ secrets.VERCEL_TOKEN }}
59+
60+ - name : Install E2E Dependencies
4161 run : |
4262 pnpm --filter @next-i18n/docs playwright:install
63+
64+ - name : Run E2E Tests
65+ run : |
4366 echo "Running tests for ${{ matrix.locale }} (Shard ${{ matrix.shard }}/${{ inputs.shard-total }})"
4467 pnpm --filter @next-i18n/docs test:e2e --shard ${{ matrix.shard }}/${{ inputs.shard-total }}
Original file line number Diff line number Diff line change 3131 uses : ./.github/workflows/test-e2e.yml
3232 with :
3333 matrix-include : ${{ needs.check-changes.outputs.matrix-include }}
34- shard-total : 3
34+ shard-total : 5
3535 secrets : inherit
3636
3737 deploy-and-update-index :
Original file line number Diff line number Diff line change 1+ import env from '@next/env' ;
12import { defineConfig , devices } from '@playwright/test' ;
3+ env . loadEnvConfig ( process . cwd ( ) ) ;
24
35export default defineConfig ( {
46 testDir : './tests/e2e' ,
@@ -18,7 +20,7 @@ export default defineConfig({
1820 } ,
1921 ] ,
2022 webServer : {
21- command : 'pnpm dev --port 7878' ,
23+ command : 'pnpm start --port 7878' ,
2224 url : 'http://localhost:7878' ,
2325 reuseExistingServer : ! process . env . CI ,
2426 timeout : 120 * 1000 ,
You can’t perform that action at this time.
0 commit comments