Skip to content

Commit

Permalink
chore: use wrangler.js as entrypoint (#6891)
Browse files Browse the repository at this point in the history
* chore: use wrangler.js as entrypoint

* chore: fix test

* chore: one more test fix

* fix

---------

Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
  • Loading branch information
andyjessop and RamIdeas authored Oct 4, 2024
1 parent 1d1a04d commit 701d41e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,13 @@ jobs:
NODE_ENV: "production"
CI_OS: ${{ runner.os }}

- name: Deploy a local version of Wrangler
run: |
pnpm --filter wrangler deploy ${{ github.workspace}}/temp/wrangler
rm ${{ github.workspace}}/temp/wrangler/templates/tsconfig.json
env:
NODE_ENV: "production"

- name: Run tests
run: pnpm run test:e2e:wrangler
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
WRANGLER: node --no-warnings ${{ github.workspace}}/temp/wrangler/bin/wrangler.js
WRANGLER_IMPORT: ${{ github.workspace}}/temp/wrangler/wrangler-dist/cli.js
WRANGLER: node --no-warnings ${{ github.workspace}}/packages/wrangler/bin/wrangler.js
WRANGLER_IMPORT: ${{ github.workspace}}/packages/wrangler/wrangler-dist/cli.js
NODE_OPTIONS: "--max_old_space_size=8192"
WRANGLER_LOG_PATH: ${{ runner.temp }}/wrangler-debug-logs/
TEST_REPORT_PATH: ${{ runner.temp }}/test-report/index.html
Expand Down
4 changes: 2 additions & 2 deletions packages/wrangler/e2e/dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -922,14 +922,14 @@ describe("custom builds", () => {
// now check assets are still fetchable, even after updates

const res = await fetch(url);
await expect(res.text()).resolves.toBe("hello\n");
await expect(res.text()).resolves.toContain("hello");

await helper.seed({
"public/index.html": "world",
});

const resText = await retry(
(text) => text === "hello\n",
(text) => text.includes("hello"),
async () => {
const res2 = await fetch(url);
return res2.text();
Expand Down

0 comments on commit 701d41e

Please sign in to comment.