Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/get-ppg-dev/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { context, trace } from "@opentelemetry/api";
import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
import { BasicTracerProvider } from "@opentelemetry/sdk-trace-base";
import { unstable_startServer } from '@prisma/dev'
import { startPrismaDevServer } from '@prisma/dev'

context.setGlobalContextManager(new AsyncLocalStorageContextManager());
trace.setGlobalTracerProvider(new BasicTracerProvider());

async function main() {
const server = await unstable_startServer({
persistenceMode: 'stateless',
})
const server = await startPrismaDevServer({ databaseIdleTimeoutMillis: 300 })

// Emit only the Prisma-compatible URL for CI shell script to capture
console.log(server.ppg.url)
console.log(server.database.connectionString)

// Wait for shutdown signal
process.once('SIGTERM', async () => {
Expand Down
1 change: 1 addition & 0 deletions .github/tests/data-modeling/delegated-types/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
set -eu

npm install
npx prisma generate
npx prisma migrate dev --name init
npm run test
3 changes: 2 additions & 1 deletion .github/tests/databases/prisma-postgres/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ popd > /dev/null # Go back to databases/prisma-postgres

# Run migration
echo "📐 Running prisma migrate dev..."
npx prisma migrate dev --name init --skip-seed
npx prisma generate
npx prisma migrate dev --name init

# Run queries (if any)
echo "🧪 Running queries..."
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/ai-sdk-nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npx prisma db seed
npm run dev &
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/astro/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npm run dev &
pid=$!
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/authjs-nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npx prisma db seed
npm run dev &
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/betterauth-astro/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npm run dev &
pid=$!
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/betterauth-nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npx prisma db seed
npm run dev &
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/clerk-astro/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init
npm run dev &
pid=$!
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/clerk-nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init
npm run dev &
pid=$!
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/cloudflare-workers/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

npm install
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npx prisma db seed
npm run dev &
Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/express/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"

popd > /dev/null # Back to databases/prisma-postgres

# Run migrations + seed
# Generate client + run migrations + seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/fastify-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/fastify-graphql-sdl-first

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/fastify-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/fastify-graphql

# Run migrations and seed
npx prisma migrate reset --force --skip-seed
npx prisma migrate reset --force
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/fastify/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/fastify

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/graphql-auth/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/graphql-auth

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/graphql-nexus/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/graphql-nexus

# Run migrations and seed
npx prisma migrate reset --force --skip-seed
npx prisma migrate reset --force
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/graphql-sdl-first

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/graphql-subscriptions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/graphql-subscriptions

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/graphql

# Run migrations and seed
npx prisma migrate reset --force --skip-seed
npx prisma migrate reset --force
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/grpc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/grpc

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/hapi-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/hapi-graphql-sdl-first

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/hapi-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/hapi-graphql

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/hapi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/hapi

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/hono/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/hono

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/koa/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/koa

# Run migrations and seed
npx prisma migrate reset --force --skip-seed
npx prisma migrate reset --force
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nest-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nest-graphql-sdl-first

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nest-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nest-graphql

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
3 changes: 2 additions & 1 deletion .github/tests/orm/nest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nest

# Run migrations and seed
npx prisma migrate reset --force --skip-seed
npx prisma migrate reset --force
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nextjs-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nextjs-graphql

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nextjs-trpc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null

# Run migrations
npx prisma generate
npx prisma migrate dev --name init

# Start the app
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nextjs

# Run migrations and seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/nuxt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/nuxt

# Run migration + seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
5 changes: 3 additions & 2 deletions .github/tests/orm/react-router-7/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ popd > /dev/null # Back to orm/react-router-7

# Run migrations and seed
echo "📐 Running Prisma migrations and seeding..."
DATABASE_URL="$DATABASE_URL" npx prisma migrate reset --force --skip-seed
DATABASE_URL="$DATABASE_URL" npx prisma migrate dev --name init
DATABASE_URL="$DATABASE_URL" npx prisma migrate reset --force
DATABASE_URL="$DATABASE_URL" npx prisma generate
npx prisma migrate dev --name init
DATABASE_URL="$DATABASE_URL" npx prisma db seed

# Start the app
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/script/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/script

# Run migrations (reset and dev)
npx prisma generate
npx prisma migrate dev --name init

# Run script (assumes it terminates; remove `&` if it blocks)
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/solid-start/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/solid-start

# Run migrations
npx prisma generate
npx prisma migrate dev --name init

# Start the app
Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/sveltekit/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/sveltekit

# Run migrations + seed
npx prisma generate
npx prisma migrate dev --name init --schema prisma/schema.prisma
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/testing-express/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ echo "✅ DATABASE_URL: $DATABASE_URL"
popd > /dev/null # Back to orm/testing-express

# Run migrations + seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed

Expand Down
1 change: 1 addition & 0 deletions .github/tests/orm/typedsql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -eu

npm install
npx prisma generate
npx prisma migrate dev --name init
npx prisma generate --sql
npm run test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
22
Loading
Loading