Skip to content

Commit 90ec143

Browse files
authored
chore(ud): Clean up Netlify e2e (#1831)
1 parent 7e40d0d commit 90ec143

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/e2e-netlify.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ jobs:
5252
- name: 🏗️ Build locally
5353
working-directory: ../cedar-test-app
5454
run: |
55-
# Read URLs from .env directly instead of sourcing — the URL contains
56-
# & (query parameter separator) which bash interprets as a background
57-
# operator when sourcing the file, truncating the value.
58-
DATABASE_URL="$(sed -n 's/^DATABASE_URL=//p' .env)"
59-
DIRECT_DATABASE_URL="$(sed -n 's/^DIRECT_DATABASE_URL=//p' .env)"
60-
export DATABASE_URL DIRECT_DATABASE_URL
6155
yarn cedar build --ud --apiRootPath=/.api/functions
6256
yarn cedar prisma migrate deploy
6357
yarn cedar data-migrate up

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@
6666
- Removes SQLite migrations (`rm -rf api/db/migrations`), then runs `yarn cedar setup neon` to provision a fresh Neon Postgres database and create Postgres baseline migration
6767
- Links site with `netlify link --id "$SITE_ID" --filter web`
6868
- Runs `yarn cedar setup deploy universal-deploy`, then `yarn cedar setup deploy netlify --ud`
69-
- Sets `DATABASE_URL` and `DIRECT_DATABASE_URL` on the Netlify site via `netlify env:set --filter web` AND injects them into `netlify.toml` (`[build.environment]`) to bypass env var propagation lag on Netlify
69+
- Builds locally (`yarn cedar build --ud --apiRootPath=/.api/functions`, then `yarn cedar prisma migrate deploy`, then `yarn cedar data-migrate up`) using `.env` database URLs
70+
- Sets `DATABASE_URL` and `DIRECT_DATABASE_URL` on the Netlify site via `netlify env:set --filter web` for runtime access
71+
- Deploys via `npx netlify deploy --filter web --prod --json --no-build`
7072
- All test-project commands use `working-directory: ../cedar-test-app` (not `CEDAR_CWD`)
71-
- Deploys via `npx netlify deploy --filter web --prod --json`
7273
- CI orchestration in `.github/workflows/ci.yml``e2e-netlify` job calls the workflow, runs only on `cedarjs/cedar` repo
7374
- API function URLs on Netlify use `/.api/functions/<name>` (configured via `apiRootPath`; routed through the `server` function from `@netlify/vite-plugin` which has `path: "/*"`)
7475
- Fixture functions in `__fixtures__/test-project-esm/api/src/functions/`:

0 commit comments

Comments
 (0)