1
1
name : CI
2
- ' on ' :
2
+
3
+ on :
3
4
push :
4
5
paths-ignore :
5
- - docs/**
6
+ - ' docs/**'
6
7
- ' *.md'
7
8
pull_request :
8
9
paths-ignore :
9
- - docs/**
10
+ - ' docs/**'
10
11
- ' *.md'
12
+
11
13
jobs :
14
+ dependency-review :
15
+ name : Dependency Review
16
+ if : github.event_name == 'pull_request'
17
+ runs-on : ubuntu-latest
18
+ permissions :
19
+ contents : read
20
+ steps :
21
+ - name : Check out repo
22
+ uses : actions/checkout@v3
23
+ with :
24
+ persist-credentials : false
25
+
26
+ - name : Dependency review
27
+ uses : actions/dependency-review-action@v1
28
+
12
29
test :
13
30
runs-on : ubuntu-latest
31
+ permissions :
32
+ contents : read
14
33
strategy :
15
34
matrix :
16
- node-version :
17
- - 14
18
- - 16
19
- - 18
35
+ node-version : [14, 16, 18]
20
36
services :
21
37
postgres :
22
38
image : postgres:11-alpine
@@ -30,14 +46,19 @@ jobs:
30
46
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
31
47
--health-retries 5
32
48
steps :
33
- - uses : actions/checkout@v3
34
- - name : Use Node.js
49
+ - name : Check out repo
50
+ uses : actions/checkout@v3
51
+ with :
52
+ persist-credentials : false
53
+
54
+ - name : Setup Node ${{ matrix.node-version }}
35
55
uses : actions/setup-node@v3
36
56
with :
37
57
node-version : ${{ matrix.node-version }}
38
- - name : Install Dependencies
39
- run : |
40
- npm install
58
+
59
+ - name : Install dependencies
60
+ run : npm i
61
+
41
62
- name : CI environment setup
42
63
run : >
43
64
npm i node-gyp
@@ -50,34 +71,23 @@ jobs:
50
71
job.services.postgres.ports[5432] }} -d postgres -c 'CREATE TABLE
51
72
users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U
52
73
postgres
53
- - name : Check licenses
54
- run : |
55
- npm run license-checker --if-present
74
+
56
75
- name : Run tests
57
76
run : |
58
77
npm run test:ci
59
- - name : Coveralls Parallel
60
- uses : coverallsapp/github-action@1.1.3
61
- with :
62
- github-token : ${{ secrets.github_token }}
63
- parallel : true
64
- flag-name : run-${{ matrix.node-version }}-${{ matrix.os }}
65
- coverage :
66
- needs : test
67
- runs-on : ubuntu-latest
68
- steps :
69
- - name : Coveralls Finished
70
- uses : coverallsapp/github-action@1.1.3
71
- with :
72
- github-token : ${{ secrets.GITHUB_TOKEN }}
73
- parallel-finished : true
78
+
74
79
automerge :
80
+ name : Automerge Dependabot PRs
81
+ if : >
82
+ github.event_name == 'pull_request' &&
83
+ github.event.pull_request.user.login == 'dependabot[bot]'
75
84
needs : test
76
- runs-on : ubuntu-latest
77
85
permissions :
78
86
pull-requests : write
79
87
contents : write
88
+ runs-on : ubuntu-latest
80
89
steps :
81
90
- uses : fastify/github-action-merge-dependabot@v3
82
91
with :
83
92
github-token : ${{ secrets.GITHUB_TOKEN }}
93
+ target : major
0 commit comments