Skip to content

default containers.max_instances to 1 #28518

default containers.max_instances to 1

default containers.max_instances to 1 #28518

Workflow file for this run

name: E2E
on:
merge_group:
pull_request:
permissions:
contents: read
jobs:
e2e-wrangler-test:
name: ${{ format('Wrangler ({0})', matrix.description) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.node }}-wrangler
cancel-in-progress: true
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: macos-13
description: v20, macOS
node: 20.19.1
- os: windows-2022
description: v20, Windows
node: 20.19.1
# we need to use an amd image to run the containers tests, since we build for linux/amd64
- os: ubuntu-22.04
description: v20, Linux
node: 20.19.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
node-version: ${{ matrix.node }}
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
- name: Bump package versions
run: node .github/changeset-version.js
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run Wrangler E2E tests
run: pnpm run test:e2e:wrangler
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
HYPERDRIVE_DATABASE_URL: ${{ secrets.TEST_HYPERDRIVE_DATABASE_URL}}
NODE_OPTIONS: "--max_old_space_size=8192"
WRANGLER_LOG_PATH: ${{ runner.temp }}/wrangler-debug-logs/
TEST_REPORT_PATH: ${{ runner.temp }}/test-report/index.html
CI_OS: ${{ matrix.os }}
- name: Upload turbo logs
if: always()
uses: actions/upload-artifact@v4
with:
name: turbo-runs-${{ matrix.os }}-${{ matrix.node }}
path: .turbo/runs
e2e-vite-test:
name: ${{ format('Vite ({0})', matrix.description) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.node }}-vite
cancel-in-progress: true
timeout-minutes: 60
strategy:
matrix:
include:
- os: macos-13
description: v20, macOS
node: 20.19.1
- os: windows-2022
description: v20, Windows
node: 20.19.1
- os: ubuntu-22.04-arm
description: v20, Linux
node: 20.19.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' || github.event_name == 'merge_group'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' || github.event_name == 'merge_group'
uses: ./.github/actions/install-dependencies
with:
node-version: ${{ matrix.node }}
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
- name: Bump package versions
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' || github.event_name == 'merge_group'
run: node .github/changeset-version.js
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run Vite E2E tests
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' || github.event_name == 'merge_group'
run: pnpm test:e2e -F @cloudflare/vite-plugin --log-order=stream
timeout-minutes: 15
env:
NODE_DEBUG: "vite-plugin:test"
# The AI tests need to connect to Cloudflare
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
NODE_OPTIONS: "--max_old_space_size=8192"
CI_OS: ${{ matrix.os }}
- name: Upload turbo logs
if: always()
uses: actions/upload-artifact@v4
with:
name: turbo-runs-${{ matrix.os }}-${{ matrix.node }}
path: .turbo/runs
# E2E tests cannot run on pull requests created from forks due to security concerns.
# In such cases we require a member of the `workers-sdk` maintainers group to manually
# run these tests on behalf of the PR.
#
# If a PR from a fork specifically requests running the e2e tests, by applying the `e2e`
# label, we want CI to fail with a descriptive message, instead of skipping the `e2e-tests`
# job altogether, which gives the false optics that CI is green. Having CI intentionally
# fail for such use cases will act as a reminder that tests need to be manually run, and
# will prevent us from accidentally merging fork PRs that are green, but never ran the
# e2e tests.
e2e-test-forks:
name: "E2E tests on forks"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.node }}
if: github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'e2e' ) && github.event.pull_request.head.repo.full_name != github.repository
runs-on: ${{ matrix.os }}
steps:
- name: Force Fail
run: |
echo: "E2E tests cannot run on pull requests created from forks due to security reasons. Please reach out to a workers-sdk maintainer to run the E2E tests on behalf of this PR."
exit 1