-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (76 loc) · 1.73 KB
/
test.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
name: test
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.asciidoc'
- 'docs/**'
- 'examples/**'
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.asciidoc'
- 'docs/**'
- 'examples/**'
# Cancel jobs running for old commits on a PR. Allow concurrent runs on 'main'.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
test-vers:
strategy:
fail-fast: false
matrix:
node:
- '22'
- '22.0'
- '20'
- '20.0'
- '18'
- '18.0'
- '16'
- '16.0'
- '14'
- '14.18.0'
runs-on: ubuntu-latest
services:
redis:
image: redis:7
ports:
- 6379:6379
mongodb:
image: mongo:7
ports:
- 27017:27017
postgres:
image: postgres:16
ports:
- "5432:5432"
env:
POSTGRES_HOST_AUTH_METHOD: 'trust'
POSTGRES_USER: 'postgres'
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: 'Very(!)Secure'
ports:
- "1433:1433"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Update npm to a version that supports package-lock lockfileVersion=2.
if: ${{ startsWith(matrix.node, '14') }}
run: npm install -g npm@9 # npm@9 supports node >=14.17.0
- run: npm run ci-all
- run: npm test
# TODO: test-windows eventually