File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -17,24 +17,32 @@ jobs:
17
17
# The type of runner that the job will run on
18
18
runs-on : ubuntu-latest
19
19
20
+ # Use matrix strategy to test multiple Node.js versions
21
+ strategy :
22
+ matrix :
23
+ node-version : [18.x, 20.x, 22.x]
24
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
25
+
20
26
# Steps represent a sequence of tasks that will be executed as part of the job
21
27
steps :
22
28
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
- - uses : actions/checkout@v3
24
- - uses : actions/setup-node@v4
29
+ - uses : actions/checkout@v4
30
+
31
+ - name : Use Node.js ${{ matrix.node-version }}
32
+ uses : actions/setup-node@v4
25
33
with :
26
- node-version : " 18.x "
34
+ node-version : ${{ matrix.node-version }}
27
35
28
36
- name : Install dependencies
29
37
run : npm install
30
38
31
- - name : Run tests
32
- run : npm test
33
-
34
39
- name : Dry-run build
35
40
run : npm run build
36
41
env :
37
42
# These env variables must be set in the repository's secrets
38
43
# - Settings -> Secrets and variables -> New repository secret
39
44
MONGO_URI : ${{ secrets.MONGO_URI }}
40
45
# Add additional environment variables here
46
+
47
+ - name : Run tests
48
+ run : npm test
You can’t perform that action at this time.
0 commit comments