11name : CI
2-
3- on :
2+ ' on ' :
43 push :
54 paths-ignore :
6- - ' docs/**'
5+ - docs/**
76 - ' *.md'
87 pull_request :
98 paths-ignore :
10- - ' docs/**'
9+ - docs/**
1110 - ' *.md'
12-
1311jobs :
1412 test :
1513 runs-on : ubuntu-latest
1614 strategy :
1715 matrix :
18- node-version : [10, 12, 14, 16]
19-
16+ node-version :
17+ - 10
18+ - 12
19+ - 14
20+ - 16
2021 services :
2122 postgres :
2223 image : postgres:11-alpine
@@ -25,45 +26,43 @@ jobs:
2526 POSTGRES_DB : postgres
2627 POSTGRES_PASSWORD : postgres
2728 ports :
28- # will assign a random free host port
29- - 5432:5432
30- # needed because the postgres container does not provide a healthcheck
31- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
32-
29+ - ' 5432:5432'
30+ options : >-
31+ --health-cmd pg_isready --health-interval 10s --health-timeout 5s
32+ --health-retries 5
3333 steps :
34- - uses : actions/checkout@v2
35-
36- - name : Use Node.js
37- uses : actions/setup-node@v2
38- with :
39- node-version : ${{ matrix.node-version }}
40-
41- - name : Install Dependencies
42- run : |
43- npm install
44-
45- - name : CI environment setup
46- run : |
47- npm i node-gyp
48- sudo apt-get install -yqq libpq-dev postgresql-client
49- chmod 600 .pgpass
50- PGPASSFILE=.pgpass psql -h localhost -p ${{ job.services.postgres.ports[5432] }} -d postgres -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres
51-
52- - name : Check licenses
53- run : |
54- npm run license-checker --if-present
34+ - uses : actions/checkout@v2
35+ - name : Use Node.js
36+ uses : actions/setup-node@v2
37+ with :
38+ node-version : ${{ matrix.node-version }}
39+ - name : Install Dependencies
40+ run : |
41+ npm install
42+ - name : CI environment setup
43+ run : >
44+ npm i node-gyp
5545
56- - name : Run tests
57- run : |
58- npm run test:ci
46+ sudo apt-get install -yqq libpq-dev postgresql-client
5947
60- - name : Coveralls Parallel
61- uses :
coverallsapp/[email protected] 62- with :
63- github-token : ${{ secrets.github_token }}
64- parallel : true
65- flag-name : run-${{ matrix.node-version }}-${{ matrix.os }}
48+ chmod 600 .pgpass
6649
50+ PGPASSFILE=.pgpass psql -h localhost -p ${{
51+ job.services.postgres.ports[5432] }} -d postgres -c 'CREATE TABLE
52+ users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U
53+ postgres
54+ - name : Check licenses
55+ run : |
56+ npm run license-checker --if-present
57+ - name : Run tests
58+ run : |
59+ npm run test:ci
60+ - name : Coveralls Parallel
61+ uses :
coverallsapp/[email protected] 62+ with :
63+ github-token : ${{ secrets.github_token }}
64+ parallel : true
65+ flag-name : run-${{ matrix.node-version }}-${{ matrix.os }}
6766 coverage :
6867 needs : test
6968 runs-on : ubuntu-latest
@@ -73,11 +72,13 @@ jobs:
7372 with :
7473 github-token : ${{ secrets.GITHUB_TOKEN }}
7574 parallel-finished : true
76-
7775 automerge :
7876 needs : test
7977 runs-on : ubuntu-latest
78+ permissions :
79+ pull-requests : write
80+ contents : write
8081 steps :
81- - uses : fastify/github-action-merge-dependabot@v2.7.1
82+ - uses : fastify/github-action-merge-dependabot@v3
8283 with :
8384 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments