30
30
name : Unit tests
31
31
strategy :
32
32
matrix :
33
- node-version : [v14.x, v16.x, v20.x ]
33
+ node-version : [18, 20, 22 ]
34
34
os : [ubuntu-latest, macos-latest, windows-latest]
35
- exclude :
36
- - os : windows-latest
37
- node-version : " v14.x"
38
- - os : macos-latest
39
- node-version : " v14.x"
40
35
fail-fast : false
41
36
42
37
runs-on : ${{ matrix.os }}
@@ -71,47 +66,35 @@ jobs:
71
66
- name : Transpile TypeScript
72
67
run : npm run prepare
73
68
74
- # the following steps are node14-only and can be safely removed
75
- # once node@14 is no longer supported
76
- - name : Setup v14.x-compatible tap
77
- if : " ${{ matrix.node-version == 'v14.x' }}"
78
- run : npm uninstall @typescript-eslint/eslint-plugin eslint-plugin-prettier tap && npm install tap@16 ts-node && npx npm@7 pkg delete tap
79
-
80
- - name : Run Tests v14.x
81
- if : " ${{ matrix.node-version == 'v14.x' }}"
82
- run : npx tap -c -t0 --no-coverage --no-ts --node-arg="--require" --node-arg="./scripts/tap16-adapter.js" --node-arg="--no-warnings" --node-arg="--loader" --node-arg="ts-node/esm" test
83
- timeout-minutes : 5
84
-
85
69
- name : Run Tests
86
70
env :
87
71
TAP_DISABLE_COVERAGE : " 1"
88
72
TAP_ALLOW_MISSING_COVERAGE : " 1"
89
73
TAP_ALLOW_INCOMPLETE_COVERAGE : " 1"
90
74
TAP_ALLOW_EMPTY_COVERAGE : " 1"
91
- if : " ${{ matrix.node-version != 'v14.x' }}"
92
75
run : npx tap -c -t0 -o test_results.tap test
93
76
timeout-minutes : 5
94
77
95
78
- name : Convert test output to XML
96
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && always() }}
79
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && always() }}
97
80
run : cat test_results.tap | npx tap - --reporter=junit > sponge_log.xml
98
81
99
82
- name : FlakyBot (Linux)
100
83
# only run flakybot on periodic (schedule) and continuous (push) events
101
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
84
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
102
85
run : |
103
86
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
104
87
chmod +x ./flakybot
105
88
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
106
89
- name : FlakyBot (Windows)
107
90
# only run flakybot on periodic (schedule) and continuous (push) events
108
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
91
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
109
92
run : |
110
93
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L
111
94
./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
112
95
- name : FlakyBot (macOS)
113
96
# only run flakybot on periodic (schedule) and continuous (push) events
114
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
97
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
115
98
run : |
116
99
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
117
100
chmod +x ./flakybot
@@ -125,17 +108,12 @@ jobs:
125
108
(github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
126
109
strategy :
127
110
matrix :
128
- node-version : [v14.x, v16.x, v20.x ]
111
+ node-version : [18, 20, 22 ]
129
112
os : [ubuntu-latest, macos-latest, windows-latest]
130
- exclude :
131
- - os : windows-latest
132
- node-version : " v14.x"
133
- - os : macos-latest
134
- node-version : " v14.x"
135
113
fail-fast : false
136
114
permissions :
137
- contents : " read"
138
- id-token : " write"
115
+ contents : read
116
+ id-token : write
139
117
issues : write
140
118
pull-requests : write
141
119
@@ -188,42 +166,12 @@ jobs:
188
166
SQLSERVER_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_PASS
189
167
SQLSERVER_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_DB
190
168
191
- # the following steps are node14-only and can be safely removed
192
- # once node@14 is no longer supported
193
- - name : Setup v14.x-compatible tap
194
- if : " ${{ matrix.node-version == 'v14.x' }}"
195
- run : npm uninstall @typescript-eslint/eslint-plugin eslint-plugin-prettier tap && npm install tap@16 ts-node && npx npm@7 pkg delete tap
196
-
197
169
- name : Setup self-direct dependency
198
170
run : npm link
199
171
200
172
- name : Link self-direct dependency
201
173
run : npm link @google-cloud/cloud-sql-connector
202
174
203
- - name : Run System Tests v14.x
204
- env :
205
- MYSQL_CONNECTION_NAME : " ${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}"
206
- MYSQL_IAM_CONNECTION_NAME : " ${{ steps.secrets.outputs.MYSQL_IAM_CONNECTION_NAME }}"
207
- MYSQL_USER : " ${{ steps.secrets.outputs.MYSQL_USER }}"
208
- MYSQL_IAM_USER : " ${{ steps.secrets.outputs.MYSQL_IAM_USER }}"
209
- MYSQL_PASS : " ${{ steps.secrets.outputs.MYSQL_PASS }}"
210
- MYSQL_DB : " ${{ steps.secrets.outputs.MYSQL_DB }}"
211
- POSTGRES_CONNECTION_NAME : " ${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
212
- POSTGRES_IAM_CONNECTION_NAME : " ${{ steps.secrets.outputs.POSTGRES_IAM_CONNECTION_NAME }}"
213
- POSTGRES_USER : " ${{ steps.secrets.outputs.POSTGRES_USER }}"
214
- POSTGRES_IAM_USER : " ${{ steps.secrets.outputs.POSTGRES_IAM_USER }}"
215
- POSTGRES_PASS : " ${{ steps.secrets.outputs.POSTGRES_PASS }}"
216
- POSTGRES_DB : " ${{ steps.secrets.outputs.POSTGRES_DB }}"
217
- POSTGRES_CAS_CONNECTION_NAME : " ${{ steps.secrets.outputs.POSTGRES_CAS_CONNECTION_NAME }}"
218
- POSTGRES_CAS_PASS : " ${{ steps.secrets.outputs.POSTGRES_CAS_PASS }}"
219
- SQLSERVER_CONNECTION_NAME : " ${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}"
220
- SQLSERVER_USER : " ${{ steps.secrets.outputs.SQLSERVER_USER }}"
221
- SQLSERVER_PASS : " ${{ steps.secrets.outputs.SQLSERVER_PASS }}"
222
- SQLSERVER_DB : " ${{ steps.secrets.outputs.SQLSERVER_DB }}"
223
- if : " ${{ matrix.node-version == 'v14.x' }}"
224
- run : npx tap -c -t0 --no-coverage --no-ts --node-arg="--require" --node-arg="./scripts/tap16-adapter.js" --node-arg="--no-warnings" --node-arg="--loader" --node-arg="ts-node/esm" system-test -o test_results.tap
225
- timeout-minutes : 5
226
-
227
175
- name : Run System Tests
228
176
env :
229
177
MYSQL_CONNECTION_NAME : " ${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}"
@@ -244,30 +192,29 @@ jobs:
244
192
SQLSERVER_USER : " ${{ steps.secrets.outputs.SQLSERVER_USER }}"
245
193
SQLSERVER_PASS : " ${{ steps.secrets.outputs.SQLSERVER_PASS }}"
246
194
SQLSERVER_DB : " ${{ steps.secrets.outputs.SQLSERVER_DB }}"
247
- if : " ${{ matrix.node-version != 'v14.x' }}"
248
195
run : npx tap -c -t0 --disable-coverage --allow-empty-coverage system-test -o test_results.tap
249
196
timeout-minutes : 5
250
197
251
198
- name : Convert test output to XML
252
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && always() }}
199
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && always() }}
253
200
run : cat test_results.tap | npx tap - --reporter=junit > sponge_log.xml
254
201
255
202
- name : FlakyBot (Linux)
256
203
# only run flakybot on periodic (schedule) and continuous (push) events
257
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
204
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Linux' && always() }}
258
205
run : |
259
206
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
260
207
chmod +x ./flakybot
261
208
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
262
209
- name : FlakyBot (Windows)
263
210
# only run flakybot on periodic (schedule) and continuous (push) events
264
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
211
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'Windows' && always() }}
265
212
run : |
266
213
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot.exe -o flakybot.exe -s -L
267
214
./flakybot.exe --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
268
215
- name : FlakyBot (macOS)
269
216
# only run flakybot on periodic (schedule) and continuous (push) events
270
- if : ${{ matrix.node-version != 'v14.x' && (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
217
+ if : ${{ (github.event_name == 'schedule' || github.event_name == 'push') && runner.os == 'macOS' && always() }}
271
218
run : |
272
219
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot-darwin-amd64 -o flakybot -s -L
273
220
chmod +x ./flakybot
@@ -291,13 +238,12 @@ jobs:
291
238
- name : Setup Node.js
292
239
uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
293
240
with :
294
- node-version : v20.x
241
+ node-version : 18
295
242
296
243
- name : Install dependencies
297
244
run : npm ci
298
245
299
246
- name : Install Prisma on node v16.x and up
300
- if : " ${{ matrix.node-version != 'v14.x' }}"
301
247
run : npm install prisma
302
248
303
249
- name : Setup self-direct dependency
0 commit comments