-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathconfig.yml
144 lines (125 loc) · 3.16 KB
/
config.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
132
133
134
135
136
137
138
139
140
141
142
143
144
version: 2.1
description: FaunaDB Javascript Driver Tests
executors:
core:
parameters:
node_version:
type: string
version:
type: enum
enum: ['stable', 'nightly']
resource_class: large
docker:
- image: cimg/node:<<parameters.node_version>>
- image: fauna/faunadb
name: core
environment:
FAUNA_ROOT_KEY: secret
FAUNA_DOMAIN: core
FAUNA_SCHEME: http
FAUNA_PORT: 8443
commands:
build_and_test:
parameters:
node_version:
type: integer
description: 'Run JS tests'
steps:
- checkout
- setup_remote_docker:
version: 24.0
docker_layer_caching: true
- restore_cache:
keys:
- v1-deps-<<parameters.node_version>>-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: npm ci
- save_cache:
paths:
- node_modules
key: v1-deps-<<parameters.node_version>>-{{ checksum "package-lock.json" }}
- run:
name: Wait FaunaDB init
command: |
while ! $(curl --output /dev/null --silent --fail --max-time 1 http://core:8443/ping); do sleep 1; done
- run:
name: Test webpack build
command: npm run wp
- run:
name: Run Tests
command: npm run test
jobs:
core-stable-14:
executor:
name: core
node_version: '14.19'
version: stable
steps:
- build_and_test:
node_version: 14
core-nightly-14:
executor:
name: core
node_version: '14.19'
version: nightly
steps:
- build_and_test:
node_version: 14
core-stable-16:
executor:
name: core
node_version: '16.15'
version: stable
steps:
- build_and_test:
node_version: 16
core-nightly-16:
executor:
name: core
node_version: '16.15'
version: nightly
steps:
- build_and_test:
node_version: 16
core-stable-18:
executor:
name: core
node_version: '18.3'
version: stable
steps:
- build_and_test:
node_version: 18
core-nightly-18:
executor:
name: core
node_version: '18.3'
version: nightly
steps:
- build_and_test:
node_version: 18
workflows:
version: 2
build_and_test:
# We test against both stable and nightly builds of the database for
# supported releases of Node.js as defined at: https://nodejs.org/en/about/releases/
# * v14 - Maintenance LTS through 2023-04-30
# * v16 - Active LTS through 2022-10-18; Maintenance LTS through 2024-04-30
# * v18 - Current on 2022-04-19
# * Active LTS on 2022-10-25
# * Maintenance LTS on 2023-10-18
jobs:
# Stable path
- core-stable-14:
context: faunadb-drivers
- core-stable-16:
context: faunadb-drivers
- core-stable-18:
context: faunadb-drivers
# Nightly path
- core-nightly-14:
context: faunadb-drivers
- core-nightly-16:
context: faunadb-drivers
- core-nightly-18:
context: faunadb-drivers