-
Notifications
You must be signed in to change notification settings - Fork 249
131 lines (109 loc) · 3.71 KB
/
driver-adapter-smoke-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Driver Adapters, Smoke Tests
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/driver-adapter-smoke-tests.yml'
- '.buildkite/**'
- '*.md'
- 'LICENSE'
- 'CODEOWNERS'
- 'renovate.json'
jobs:
driver-adapter-smoke-tests:
name: ${{ matrix.adapter }}
strategy:
fail-fast: false
matrix:
adapter: ['neon:ws', 'neon:http', planetscale, pg, libsql]
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
# via package.json rewritten into DATABASE_URL before scripts are run
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 }}
# TODO: test sqld and embedded replicas
JS_LIBSQL_DATABASE_URL: file:/tmp/libsql.db
# TODO: test all three of ("number", "bigint", "string") and conditionally skip some tests as appropriate
JS_LIBSQL_INT_MODE: bigint
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
driver-adapter-smoke-tests-errors:
name: Errors
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:
# via package.json rewritten into DATABASE_URL before scripts are run
JS_PG_DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
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
- name: pnpm errors
run: pnpm errors
if: always()
working-directory: ./query-engine/driver-adapters/js/smoke-test-js