Skip to content

Commit 4572082

Browse files
committed
disable e2e tests when releasing, update starter version
we already run e2e for PRs, including Version packages, so don't need to run again on release
1 parent 2450ebd commit 4572082

File tree

3 files changed

+7
-93
lines changed

3 files changed

+7
-93
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -63,78 +63,9 @@ jobs:
6363
- name: Run container unit tests
6464
run: npm run test -w @repo/sandbox-container
6565

66-
# E2E tests run in parallel with unit tests
67-
e2e-tests:
68-
if: ${{ github.repository_owner == 'cloudflare' }}
69-
runs-on: ubuntu-latest
70-
timeout-minutes: 30
71-
72-
steps:
73-
- uses: actions/checkout@v4
74-
75-
- uses: actions/setup-node@v4
76-
with:
77-
node-version: 24
78-
cache: "npm"
79-
80-
- uses: oven-sh/setup-bun@v2
81-
with:
82-
bun-version: latest
83-
84-
- name: Install dependencies
85-
run: npm ci
86-
87-
- name: Build packages
88-
run: npm run build
89-
90-
- name: Set worker name
91-
id: worker-name
92-
run: |
93-
# Use git SHA for unique, meaningful naming (not sequential run number)
94-
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
95-
echo "worker_name=sandbox-e2e-test-worker-release-${SHORT_SHA}" >> $GITHUB_OUTPUT
96-
97-
# Generate unique wrangler config for this release
98-
- name: Generate wrangler config
99-
run: |
100-
cd tests/e2e/test-worker
101-
./generate-config.sh ${{ steps.worker-name.outputs.worker_name }}
102-
103-
- name: Build test worker Docker image
104-
run: npm run docker:local -w @cloudflare/sandbox
105-
106-
- name: Deploy test worker
107-
uses: cloudflare/wrangler-action@v3
108-
with:
109-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
110-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
111-
command: deploy --name ${{ steps.worker-name.outputs.worker_name }}
112-
workingDirectory: tests/e2e/test-worker
113-
114-
- name: Get deployment URL
115-
id: get-url
116-
run: |
117-
echo "worker_url=https://${{ steps.worker-name.outputs.worker_name }}.agents-b8a.workers.dev" >> $GITHUB_OUTPUT
118-
119-
- name: Run E2E tests
120-
run: npx vitest run --config vitest.e2e.config.ts
121-
env:
122-
TEST_WORKER_URL: ${{ steps.get-url.outputs.worker_url }}
123-
CI: true
124-
125-
- name: Cleanup test deployment
126-
if: always()
127-
continue-on-error: true
128-
run: |
129-
cd tests/e2e/test-worker
130-
../../../scripts/cleanup-test-deployment.sh ${{ steps.worker-name.outputs.worker_name }}
131-
env:
132-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
133-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
134-
13566
# Prerelease publish - always runs after tests pass
13667
publish-prerelease:
137-
needs: [unit-tests, e2e-tests]
68+
needs: [unit-tests]
13869
if: ${{ github.repository_owner == 'cloudflare' }}
13970
runs-on: ubuntu-latest
14071
timeout-minutes: 20
@@ -185,7 +116,7 @@ jobs:
185116

186117
# Release publish - only runs if changesets exist
187118
publish-release:
188-
needs: [unit-tests, e2e-tests]
119+
needs: [unit-tests]
189120
if: ${{ github.repository_owner == 'cloudflare' }}
190121
runs-on: ubuntu-latest
191122
timeout-minutes: 20

examples/minimal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cf-typegen": "wrangler types"
1212
},
1313
"devDependencies": {
14-
"@cloudflare/sandbox": "^0.3.6",
14+
"@cloudflare/sandbox": "^0.4.3",
1515
"@types/node": "^24.1.0",
1616
"typescript": "^5.8.3",
1717
"wrangler": "^4.41.0"

package-lock.json

Lines changed: 4 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)