-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.drone.jsonnet
49 lines (48 loc) · 1.53 KB
/
.drone.jsonnet
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
local Pipeline(name, nodeVersion, mongoVersion) = {
kind: 'pipeline',
type: 'docker',
name: name,
steps: [
{
name: 'test',
image: 'node:' + nodeVersion,
environment: {
URUNGI_TEST_MYSQL: '{ "host": "mariadb", "database": "urungi_tests", "user": "urungi", "password": "urungi" }',
URUNGI_TEST_PG: '{ "host": "postgres", "database": "urungi_tests", "user": "urungi", "password": "urungi" }',
MONGOMS_VERSION: mongoVersion,
},
commands: [
'npm ci',
'npx jest --coverage',
],
},
],
services: [
{
name: 'mariadb',
image: 'mariadb:10.3',
environment: {
MYSQL_RANDOM_ROOT_PASSWORD: 'yes',
MYSQL_DATABASE: 'urungi_tests',
MYSQL_USER: 'urungi',
MYSQL_PASSWORD: 'urungi',
},
},
{
name: 'postgres',
image: 'postgres:9.6',
environment: {
POSTGRES_DB: 'urungi_tests',
POSTGRES_USER: 'urungi',
POSTGRES_PASSWORD: 'urungi',
},
},
],
};
[
Pipeline('node:18 mongo:5.0', '18-bullseye', '5.0.28'),
Pipeline('node:18 mongo:6.0', '18-bullseye', '6.0.17'),
Pipeline('node:20 mongo:5.0', '20-bullseye', '5.0.28'),
Pipeline('node:20 mongo:6.0', '20-bullseye', '6.0.17'),
Pipeline('node:20 mongo:7.0', '20-bullseye', '7.0.12'),
]