Skip to content

Commit

Permalink
fix: Make edge workflows work properly (#925)
Browse files Browse the repository at this point in the history
* Update workflows to hardcode some variables

* Fix hono deployed app URL for tests to pass

* Add protocol in the hono URL to make tests pass

* Add possible fix for hono workflow test

* Remove obsolte edge function test in workflow

* Make hono start command use run-all

* Fix hono example test to run with all tests

* Make hono example return 200 OK on root route
  • Loading branch information
deepjyoti30-st authored Sep 23, 2024
1 parent 40078d2 commit e57cda4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-cf-worker-hono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
APP_URL: ${{ secrets.CLOUDFLARE_HONO_APP_URL }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_HONO_PROJECT_NAME }}
APP_URL: "https://hono.rishabh-77b.workers.dev"
CLOUDFLARE_PROJECT_NAME: "hono"
TEST_DEPLOYED_VERSION: true
defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-cf-worker-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
APP_URL: ${{ secrets.CLOUDFLARE_APP_URL }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
APP_URL: "supertokens-node-b95.pages.dev"
CLOUDFLARE_PROJECT_NAME: "supertokens-node-pr-check-for-edge-function-compat"
TEST_DEPLOYED_VERSION: true
defaults:
run:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/test-edge-function.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ app.get("/sessioninfo", (c) => {
});
});

app.get("/", (c) => {
return c.json({
"message": "Hello from Supertokens"
})
})

export default app;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "wrangler dev index.ts --port 3001"
"start": "wrangler dev index.ts --port 3000"
},
"dependencies": {
"hono": "^4.3.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const assert = require("assert");
// Run the tests in a DOM environment.
require("jsdom-global")();

const APP_URL = process.env.APP_URL || "http://localhost:8787";
const APP_URL = process.env.APP_URL || "http://localhost:3000";

describe("Auth API Tests", () => {
const signupBody = {
Expand Down

0 comments on commit e57cda4

Please sign in to comment.