1- name : CI workflow  
1+ name : CI 
22
3- on : [push, pull_request] 
3+ on :
4+   push :
5+     paths-ignore :
6+       - ' docs/**' 
7+       - ' *.md' 
8+   pull_request :
9+     paths-ignore :
10+       - ' docs/**' 
11+       - ' *.md' 
412
513jobs :
6-   build :
14+   test :
715    runs-on : ubuntu-latest 
816    strategy :
917      matrix :
10-         node : [10, 12, 14] 
11-     
12-     name : Node.js ${{ matrix.node }} 
13-     
18+         node-version : [10.x, 12.x, 14.x] 
19+ 
1420    services :
1521      postgres :
1622        image : postgres:11-alpine 
@@ -25,25 +31,51 @@ jobs:
2531        options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 
2632
2733    steps :
28-     - uses : actions/checkout@v1 
34+     - uses : actions/checkout@v2 
35+ 
36+     - name : Use Node.js 
37+ 2938      with :
3039        node-version : ${{ matrix.node-version }} 
3140
41+     - name : Install Dependencies 
42+       run : | 
43+         npm install 
44+ 
3245name : CI environment setup 
3346      run : | 
3447        npm i node-gyp  
3548        sudo apt-get install -yqq libpq-dev postgresql-client 
3649        chmod 600 .pgpass 
3750        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 
3851
39- name : Install 
40-       run : npm install 
52+ name : Check licenses 
53+       run : | 
54+         npm run license-checker --if-present 
55+ 
56+ name : Run tests 
57+       run : | 
58+         npm run test:ci 
59+ 
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 }} 
4166
42-     - name : Run tests       
43-       run : npm run test 
67+   coverage :
68+     needs : test 
69+     runs-on : ubuntu-latest 
70+     steps :
71+       - name : Coveralls Finished 
72+         uses : 
coverallsapp/[email protected]   73+         with :
74+           github-token : ${{ secrets.GITHUB_TOKEN }} 
75+           parallel-finished : true 
4476
4577  automerge :
46-     needs : build 
78+     needs : test 
4779    runs-on : ubuntu-latest 
4880    steps :
4981      - uses : fastify/github-action-merge-dependabot@v1 
0 commit comments