77 branches : [ master ]
88
99jobs :
10- build :
10+ test :
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
15- node-version : [12, 14, 16]
14+ node-version : [14, 16, 18] # Maintenance, Active LTS & Current
1615 services :
1716 postgres :
1817 image : postgres:latest
@@ -26,25 +25,26 @@ jobs:
2625 uses : actions/setup-node@v3
2726 with :
2827 node-version : ${{ matrix.node-version }}
29- - run : npm install
30- - run : npm test
31- env :
32- PGUSER : postgres
28+ - run : npm ci
29+ - name : Configure database
30+ run : node pretest.js
31+ - name : Run test
32+ run : npm test --ignore-scripts
33+ env :
34+ PGUSER : postgres
35+
3336 code-lint :
3437 name : Code Lint
3538 runs-on : ubuntu-latest
3639 timeout-minutes : 60
3740 steps :
3841 - uses : actions/checkout@v3
39- - name : Use Node.js 14
40- uses : actions/setup-node@v3
42+ - uses : actions/setup-node@v3
4143 with :
42- node-version : 14
43- - name : Bootstrap project
44- run : |
45- npm ci --ignore-scripts
44+ node-version : 16 # LTS
45+ - run : npm ci --ignore-scripts
4646 - name : Verify code linting
47- run : npm run lint
47+ run : npx --no eslint .
4848
4949 commit-lint :
5050 name : Commit Lint
5454 - uses : actions/checkout@v3
5555 with :
5656 fetch-depth : 0
57- - name : Use Node.js 14
58- uses : actions/setup-node@v3
57+ - uses : actions/setup-node@v3
5958 with :
60- node-version : 14
61- - name : Bootstrap project
62- run : |
63- npm ci --ignore-scripts
59+ node-version : 16 # LTS
60+ - run : npm ci --ignore-scripts
6461 - name : Verify commit linting
65- run : npx commitlint --from origin/master --to HEAD --verbose
62+ run : npx --no -p @commitlint/cli commitlint --from origin/master --to HEAD --verbose
0 commit comments