Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"dist/**/*",
"node_modules/**/*",
"tests/client/**/*",
"tests/client-*/**/*",
"tests/db/**/*"
]
}
59 changes: 52 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -47,6 +47,10 @@ jobs:
mysql-tests:
runs-on: ubuntu-latest

strategy:
matrix:
prisma-version: [6, 7]

services:
mysql:
image: mysql:8.0
Expand All @@ -64,15 +68,26 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Prisma ${{ matrix.prisma-version }}
run: npm install prisma@${{ matrix.prisma-version }} @prisma/client@${{ matrix.prisma-version }}

- name: Configure Prisma 6 (if applicable)
if: matrix.prisma-version == 6
run: |
# Add url back to schema (Prisma 6 requires it in schema file)
sed -i 's/provider = "mysql"/provider = "mysql"\n url = env("DATABASE_URL")/' tests/prisma/schema.mysql.prisma
# Remove prisma.config.ts (not fully supported in Prisma 6)
rm -f prisma.config.ts

- name: Set up MySQL test database
env:
DATABASE_URL: mysql://root:testpassword@localhost:3306/testdb
Expand All @@ -88,6 +103,10 @@ jobs:
postgres-tests:
runs-on: ubuntu-latest

strategy:
matrix:
prisma-version: [6, 7]

services:
postgres:
image: postgres:15
Expand All @@ -106,15 +125,26 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Prisma ${{ matrix.prisma-version }}
run: npm install prisma@${{ matrix.prisma-version }} @prisma/client@${{ matrix.prisma-version }}

- name: Configure Prisma 6 (if applicable)
if: matrix.prisma-version == 6
run: |
# Add url back to schema (Prisma 6 requires it in schema file)
sed -i 's/provider = "postgresql"/provider = "postgresql"\n url = env("DATABASE_URL")/' tests/prisma/schema.postgres.prisma
# Remove prisma.config.ts (not fully supported in Prisma 6)
rm -f prisma.config.ts

- name: Set up PostgreSQL test database
env:
DATABASE_URL: postgresql://postgres:testpassword@localhost:5432/testdb
Expand All @@ -130,18 +160,33 @@ jobs:
sqlite-tests:
runs-on: ubuntu-latest

strategy:
matrix:
prisma-version: [6, 7]

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Prisma ${{ matrix.prisma-version }}
run: npm install prisma@${{ matrix.prisma-version }} @prisma/client@${{ matrix.prisma-version }}

- name: Configure Prisma 6 (if applicable)
if: matrix.prisma-version == 6
run: |
# Add url back to schema (Prisma 6 requires it in schema file)
sed -i 's/provider = "sqlite"/provider = "sqlite"\n url = "file:..\/db\/test.db"/' tests/prisma/schema.prisma
# Remove prisma.config.ts (not fully supported in Prisma 6)
rm -f prisma.config.ts

- name: Set up SQLite test database
run: |
mkdir -p tests/db
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
Loading