-
Notifications
You must be signed in to change notification settings - Fork 322
171 lines (158 loc) Β· 6.03 KB
/
Copy pathtest-schema-engine.yml
File metadata and controls
171 lines (158 loc) Β· 6.03 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: 'SE'
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/test-schema-engine.yml'
- '!.github/workflows/test-schema-engine-linux-template.yml'
- '*.md'
- 'LICENSE'
- 'CODEOWNERS'
# Specific
- 'query-compiler/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-mongodb-schema-connector:
if: github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '/test-all'))
strategy:
fail-fast: false
matrix:
database:
- name: 'mongodb5'
url: 'mongodb://prisma:prisma@localhost:27018/?authSource=admin&retryWrites=true'
- name: 'mongodb44'
url: 'mongodb://prisma:prisma@localhost:27017/?authSource=admin&retryWrites=true'
- name: 'mongodb42'
url: 'mongodb://prisma:prisma@localhost:27016/?authSource=admin&retryWrites=true'
name: '${{ matrix.database.name }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@nextest
- name: Login to Docker Hub
uses: docker/login-action@v3
continue-on-error: true
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 'Start ${{ matrix.database.name }}'
run: make start-${{ matrix.database.name }}-single
# MongoDB tests MUST run single threaded
- run: cargo nextest run -p mongodb-schema-connector --test-threads=1
env:
CLICOLOR_FORCE: 1
TEST_DATABASE_URL: ${{ matrix.database.url }}
test-linux:
strategy:
fail-fast: false
matrix:
ubuntu:
- '24.04'
database:
- name: mssql_2022
url: 'sqlserver://localhost:1435;database=master;user=SA;password=<YourStrong@Passw0rd>;trustServerCertificate=true;socket_timeout=60;isolationLevel=READ UNCOMMITTED'
- name: mysql_8
url: 'mysql://root:prisma@localhost:3307'
- name: postgres16
url: 'postgresql://postgres:prisma@localhost:5439'
- name: sqlite
url: sqlite
name: '${{ matrix.database.name }} on Linux'
uses: ./.github/workflows/test-schema-engine-linux-template.yml
with:
ubuntu: ${{ matrix.ubuntu }}
database_name: ${{ matrix.database.name }}
database_url: ${{ matrix.database.url }}
test-linux-push:
if: |
github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '/test-all'))
strategy:
fail-fast: false
matrix:
ubuntu:
- '24.04'
database:
- name: mssql_2019
url: 'sqlserver://localhost:1433;database=master;user=SA;password=<YourStrong@Passw0rd>;trustServerCertificate=true;socket_timeout=60;isolationLevel=READ UNCOMMITTED'
- name: mysql_5_6
url: 'mysql://root:prisma@localhost:3309'
- name: mysql_5_7
url: 'mysql://root:prisma@localhost:3306'
- name: mysql_mariadb
url: 'mysql://root:prisma@localhost:3308'
- name: postgres12
url: 'postgresql://postgres:prisma@localhost:5434'
- name: postgres13
url: 'postgresql://postgres:prisma@localhost:5435'
- name: postgres14
url: 'postgresql://postgres:prisma@localhost:5437'
- name: postgres15
url: 'postgresql://postgres:prisma@localhost:5438'
- name: cockroach_23_1
url: 'postgresql://prisma@localhost:26260'
- name: cockroach_22_2
url: 'postgresql://prisma@localhost:26259'
- name: cockroach_22_1_0
url: 'postgresql://prisma@localhost:26257'
- name: vitess_8_0
url: 'mysql://root:prisma@localhost:33807/test'
shadow_database_url: 'mysql://root:prisma@localhost:33808/shadow'
is_vitess: true
single_threaded: true
name: '${{ matrix.database.name }} on Linux'
uses: ./.github/workflows/test-schema-engine-linux-template.yml
with:
ubuntu: ${{ matrix.ubuntu }}
database_name: ${{ matrix.database.name }}
database_url: ${{ matrix.database.url }}
shadow_database_url: ${{ matrix.database.shadow_database_url }}
is_vitess: ${{ matrix.database.is_vitess || false }}
single_threaded: ${{ matrix.database.single_threaded || false }}
test-windows:
if: github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '/test-all'))
strategy:
fail-fast: false
matrix:
database:
- name: 'mysql-lts'
url: 'mysql://root@localhost:3306?connect_timeout=20&socket_timeout=60'
- name: 'mariadb'
url: 'mysql://root@localhost:3306?connect_timeout=20&socket_timeout=60'
rust:
- stable
os:
- windows-latest
runs-on: ${{ matrix.os }}
name: '${{ matrix.database.name }} on Windows'
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@nextest
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install ${{ matrix.database.name }}
run: |
iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop install sudo
scoop install ${{ matrix.database.name }}
sudo mysqld --install
sudo sc start MySQL
- name: Run tests
run: cargo nextest run -p sql-migration-tests --test-threads=8
env:
TEST_DATABASE_URL: ${{ matrix.database.url }}