-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(driver adapters): Workflow that runs driver adapters smoke test in…
… CI (#4266)
- Loading branch information
Showing
6 changed files
with
122 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Driver Adapters, Smoke Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- '.buildkite/**' | ||
- '*.md' | ||
- 'LICENSE' | ||
- 'CODEOWNERS' | ||
- 'renovate.json' | ||
|
||
jobs: | ||
driver-adapter-smoke-tests: | ||
name: Smoke tests for adapter ${{ matrix.adapter }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
adapter: ["neon:ws", "neon:http", planetscale, pg] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
env: | ||
JS_NEON_DATABASE_URL: ${{ secrets.JS_NEON_DATABASE_URL }} | ||
JS_PLANETSCALE_DATABASE_URL: ${{ secrets.JS_PLANETSCALE_DATABASE_URL }} | ||
JS_PG_DATABASE_URL: postgres://postgres:postgres@localhost:5432/test # ${{ secrets.JS_PG_DATABASE_URL }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
#cache: 'pnpm' | ||
|
||
- name: Compile Query Engine | ||
run: cargo build -p query-engine-node-api | ||
|
||
- name: Install Dependencies (Driver Adapters) | ||
run: pnpm install | ||
working-directory: ./query-engine/driver-adapters/js | ||
- name: Build Driver Adapters | ||
run: pnpm build | ||
working-directory: ./query-engine/driver-adapters/js | ||
|
||
- run: pnpm prisma:${{ matrix.adapter }} | ||
working-directory: ./query-engine/driver-adapters/js/smoke-test-js | ||
- run: pnpm ${{ matrix.adapter }}:libquery | ||
working-directory: ./query-engine/driver-adapters/js/smoke-test-js | ||
- name: pnpm ${{ matrix.adapter }}:client (using @prisma/client - including engine! - from Npm) | ||
run: pnpm ${{ matrix.adapter }}:client | ||
if: always() | ||
working-directory: ./query-engine/driver-adapters/js/smoke-test-js | ||
|
||
- name: pnpm errors | ||
run: pnpm errors | ||
if: always() | ||
working-directory: ./query-engine/driver-adapters/js/smoke-test-js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,38 +11,40 @@ | |
"prisma:db:push:mysql": "prisma db push --schema ./prisma/mysql/schema.prisma --force-reset", | ||
"prisma:db:execute:mysql": "prisma db execute --schema ./prisma/mysql/schema.prisma --file ./prisma/mysql/commands/type_test/insert.sql", | ||
"prisma:studio:mysql": "prisma studio --schema ./prisma/mysql/schema.prisma", | ||
"prisma:neon:ws": "pnpm prisma:neon", | ||
"prisma:neon:http": "pnpm prisma:neon", | ||
"prisma:neon": "cross-env-shell DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" \"pnpm prisma:db:push:postgres && pnpm prisma:db:execute:postgres\"", | ||
"studio:neon": "cross-env-shell DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" \"pnpm prisma:studio:postgres\"", | ||
"neon:ws:libquery": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --loader=tsx ./src/libquery/neon.ws.test.ts", | ||
"neon:http:libquery": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --loader=tsx ./src/libquery/neon.http.test.ts", | ||
"neon:ws:client": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --loader=tsx ./src/client/neon.ws.test.ts", | ||
"neon:http:client": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --loader=tsx ./src/client/neon.http.test.ts", | ||
"neon:ws:libquery": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/libquery/neon.ws.test.ts", | ||
"neon:http:libquery": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/libquery/neon.http.test.ts", | ||
"neon:ws:client": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/client/neon.ws.test.ts", | ||
"neon:http:client": "DATABASE_URL=\"${JS_NEON_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/client/neon.http.test.ts", | ||
"neon:ws": "pnpm neon:ws:libquery && pnpm neon:ws:client", | ||
"neon:http": "pnpm neon:http:libquery && pnpm neon:http:client", | ||
"prisma:pg": "cross-env-shell DATABASE_URL=\"${JS_PG_DATABASE_URL}\" \"pnpm prisma:db:push:postgres && pnpm prisma:db:execute:postgres\"", | ||
"studio:pg": "cross-env-shell DATABASE_URL=\"${JS_PG_DATABASE_URL}\" \"pnpm prisma:studio:postgres\"", | ||
"pg:libquery": "cross-env-shell DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --loader=tsx ./src/libquery/pg.test.ts", | ||
"pg:client": "DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --loader=tsx ./src/client/pg.test.ts", | ||
"pg:libquery": "cross-env-shell DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/libquery/pg.test.ts", | ||
"pg:client": "DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/client/pg.test.ts", | ||
"pg": "pnpm pg:libquery && pnpm pg:client", | ||
"errors": "DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --loader=tsx ./src/libquery/errors.test.ts", | ||
"errors": "DATABASE_URL=\"${JS_PG_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/libquery/errors.test.ts", | ||
"prisma:planetscale": "cross-env-shell DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" \"pnpm prisma:db:push:mysql && pnpm prisma:db:execute:mysql\"", | ||
"studio:planetscale": "cross-env-shell DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" \"pnpm prisma:studio:mysql\"", | ||
"planetscale:libquery": "DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" node --test --loader=tsx ./src/libquery/planetscale.test.ts", | ||
"planetscale:client": "DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" node --test --loader=tsx ./src/client/planetscale.test.ts", | ||
"planetscale:libquery": "DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/libquery/planetscale.test.ts", | ||
"planetscale:client": "DATABASE_URL=\"${JS_PLANETSCALE_DATABASE_URL}\" node --test --test-reporter spec --loader=tsx ./src/client/planetscale.test.ts", | ||
"planetscale": "pnpm planetscale:libquery && pnpm planetscale:client" | ||
}, | ||
"keywords": [], | ||
"author": "Alberto Schiabel <[email protected]>", | ||
"license": "Apache-2.0", | ||
"sideEffects": true, | ||
"dependencies": { | ||
"@neondatabase/serverless": "^0.6.0", | ||
"@planetscale/database": "^1.11.0", | ||
"@prisma/adapter-neon": "workspace:*", | ||
"@prisma/adapter-planetscale": "workspace:*", | ||
"@prisma/adapter-pg": "workspace:*", | ||
"@prisma/adapter-planetscale": "workspace:*", | ||
"@prisma/client": "5.4.0-dev.29", | ||
"@prisma/driver-adapter-utils": "workspace:*", | ||
"@neondatabase/serverless": "^0.6.0", | ||
"@planetscale/database": "^1.11.0", | ||
"@prisma/client": "5.3.0-integration-feat-driver-adapters-in-client.3", | ||
"pg": "^8.11.3", | ||
"superjson": "^1.13.1", | ||
"undici": "^5.23.0" | ||
|
@@ -51,7 +53,7 @@ | |
"@types/node": "^20.5.1", | ||
"@types/pg": "^8.10.2", | ||
"cross-env": "^7.0.3", | ||
"prisma": "5.3.0-integration-feat-driver-adapters-in-client.3", | ||
"prisma": "5.4.0-dev.29", | ||
"tsx": "^3.12.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters