diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5e84c1893c4b..7aac41bfa2ef 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -52,7 +52,17 @@ jobs: NODE_ENV: "production" CI_OS: ${{ runner.os }} - - name: Build Wrangler package for npm + - name: Pack Miniflare + run: pnpm pack --pack-destination $HOME + env: + NODE_ENV: "production" + working-directory: packages/miniflare + + - name: Modify wrangler package.json miniflare dependency + run: pnpm add $(ls $HOME/miniflare-*.tgz) + working-directory: packages/wrangler + + - name: Pack Wrangler run: pnpm pack --pack-destination $HOME env: NODE_ENV: "production" @@ -62,8 +72,6 @@ jobs: shell: bash id: "find-wrangler" run: echo "dir=$(ls $HOME/wrangler-*.tgz)" >> $GITHUB_OUTPUT; - env: - NODE_ENV: "production" - name: Run tests id: e2e-1 @@ -74,12 +82,3 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }} WRANGLER: pnpm --silent --package ${{ steps.find-wrangler.outputs.dir}} dlx wrangler NODE_OPTIONS: "--max_old_space_size=8192" - - - name: Retry tests - if: steps.e2e-1.outcome == 'failure' - run: pnpm run --filter wrangler test:e2e - env: - CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }} - WRANGLER: pnpm --silent --package ${{ steps.find-wrangler.outputs.dir}} dlx wrangler - NODE_OPTIONS: "--max_old_space_size=8192" diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index b370e166f847..939a266a1d21 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -63,7 +63,7 @@ "test": "pnpm run assert-git-version && jest", "test:ci": "pnpm run test --coverage", "test:debug": "pnpm run test --silent=false --verbose=true", - "test:e2e": "vitest --test-timeout 240000 --single-thread --dir ./e2e run", + "test:e2e": "vitest --test-timeout 240000 --single-thread --dir ./e2e --retry 2 run", "test:watch": "pnpm run test --runInBand --testTimeout=50000 --watch", "type:tests": "tsc -p ./src/__tests__/tsconfig.json && tsc -p ./e2e/tsconfig.json" },