Skip to content

Commit

Permalink
run C3 E2E against Wrangler pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Dec 18, 2024
1 parent 0c10537 commit df2b960
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/actions/run-c3-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ runs:
TEST_PM: ${{ inputs.packageManager }}
TEST_PM_VERSION: ${{ inputs.packageManagerVersion }}
CI_OS: ${{ runner.os }}
WRANGLER_PACKAGE: https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/${{ github.event.number }}/npm-package-wrangler-${{ github.event.number }}

- name: Upload Logs
uses: actions/upload-artifact@v4
Expand Down
59 changes: 58 additions & 1 deletion .github/workflows/create-pullrequest-prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Pull Request Prerelease
name: PR Pre-releases & C3 E2E

on: pull_request

Expand Down Expand Up @@ -73,3 +73,60 @@ jobs:
# Required by the `@actions/artifact` package
ACTIONS_RUNTIME_TOKEN: ${{ env.GITHUB_ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL: ${{ env.GITHUB_ACTIONS_RESULTS_URL }}

c3-e2e:
needs: build
# Note: please keep this job in sync with the e2e-only-dependabot-bumped-framework one
#  in .github/workflows/c3-e2e-dependabot.yml
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.pm.name }}-${{ matrix.pm.version }}
cancel-in-progress: true
name: ${{ format('Run tests for {0}@{1} on {2}', matrix.pm.name, matrix.pm.version, matrix.os) }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
pm:
[
{ name: npm, version: "0.0.0" },
{ name: pnpm, version: "9.12.0" },
{ name: bun, version: "1.0.3" },
{ name: yarn, version: "1.0.0" },
]
# include a single windows test with pnpm
include:
- os: windows-latest
pm: { name: pnpm, version: "9.12.0" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
everything_but_markdown:
- '!**/*.md'
- name: Install Dependencies
if: steps.changes.outputs.everything_but_markdown == 'true'
uses: ./.github/actions/install-dependencies
with:
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}

- name: E2E Tests
if: steps.changes.outputs.everything_but_markdown == 'true'
uses: ./.github/actions/run-c3-e2e
with:
packageManager: ${{ matrix.pm.name }}
packageManagerVersion: ${{ matrix.pm.version }}
quarantine: false
accountId: ${{ secrets.C3_TEST_CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.C3_TEST_CLOUDFLARE_API_TOKEN }}
2 changes: 1 addition & 1 deletion packages/create-cloudflare/src/helpers/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const installWrangler = async () => {
return;
}

await installPackages([`wrangler`], {
await installPackages([process.env.WRANGLER_PACKAGE ?? `wrangler`], {
dev: true,
startText: `Installing wrangler ${dim(
"A command line tool for building Cloudflare Workers",
Expand Down
6 changes: 4 additions & 2 deletions packages/create-cloudflare/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"CI",
"CREATE_CLOUDFLARE_TELEMETRY_DISABLED",
"CREATE_CLOUDFLARE_TELEMETRY_DEBUG",
"SPARROW_SOURCE_KEY"
"SPARROW_SOURCE_KEY",
"WRANGLER_PACKAGE"
],
"outputs": ["dist/**"]
},
Expand All @@ -24,7 +25,8 @@
"E2E_RETRIES",
"E2E_NO_DEPLOY",
"E2E_EXPERIMENTAL",
"TEST_PM"
"TEST_PM",
"WRANGLER_PACKAGE"
],
"dependsOn": ["build"],
"outputs": [".e2e-logs", ".e2e-logs-experimental"]
Expand Down

0 comments on commit df2b960

Please sign in to comment.