Skip to content

Commit fe3f5be

Browse files
authored
ci: bring into line with reusable workflow (#133)
1 parent 2161260 commit fe3f5be

File tree

2 files changed

+41
-33
lines changed

2 files changed

+41
-33
lines changed

Diff for: .github/workflows/ci.yml

+41-31
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
name: CI
2-
'on':
2+
3+
on:
34
push:
45
paths-ignore:
5-
- docs/**
6+
- 'docs/**'
67
- '*.md'
78
pull_request:
89
paths-ignore:
9-
- docs/**
10+
- 'docs/**'
1011
- '*.md'
12+
1113
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+
1229
test:
1330
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
1433
strategy:
1534
matrix:
16-
node-version:
17-
- 14
18-
- 16
19-
- 18
35+
node-version: [14, 16, 18]
2036
services:
2137
postgres:
2238
image: postgres:11-alpine
@@ -30,14 +46,19 @@ jobs:
3046
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
3147
--health-retries 5
3248
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 }}
3555
uses: actions/setup-node@v3
3656
with:
3757
node-version: ${{ matrix.node-version }}
38-
- name: Install Dependencies
39-
run: |
40-
npm install
58+
59+
- name: Install dependencies
60+
run: npm i
61+
4162
- name: CI environment setup
4263
run: >
4364
npm i node-gyp
@@ -50,34 +71,23 @@ jobs:
5071
job.services.postgres.ports[5432] }} -d postgres -c 'CREATE TABLE
5172
users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U
5273
postgres
53-
- name: Check licenses
54-
run: |
55-
npm run license-checker --if-present
74+
5675
- name: Run tests
5776
run: |
5877
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+
7479
automerge:
80+
name: Automerge Dependabot PRs
81+
if: >
82+
github.event_name == 'pull_request' &&
83+
github.event.pull_request.user.login == 'dependabot[bot]'
7584
needs: test
76-
runs-on: ubuntu-latest
7785
permissions:
7886
pull-requests: write
7987
contents: write
88+
runs-on: ubuntu-latest
8089
steps:
8190
- uses: fastify/github-action-merge-dependabot@v3
8291
with:
8392
github-token: ${{ secrets.GITHUB_TOKEN }}
93+
target: major

Diff for: README.md

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
![CI](https://github.com/fastify/fastify-postgres/workflows/CI/badge.svg)
44
[![NPM version](https://img.shields.io/npm/v/@fastify/postgres.svg?style=flat)](https://www.npmjs.com/package/@fastify/postgres)
5-
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-postgres/badge.svg)](https://snyk.io/test/github/fastify/fastify-postgres)
6-
[![Coverage Status](https://coveralls.io/repos/github/fastify/fastify-postgres/badge.svg?branch=master)](https://coveralls.io/github/fastify/fastify-postgres?branch=master)
75
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
86

97
Fastify PostgreSQL connection plugin; with this, you can share the same PostgreSQL connection pool in every part of your server.

0 commit comments

Comments
 (0)