Skip to content

automatic PR #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 45 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: CI

on:
'on':
push:
paths-ignore:
- 'docs/**'
- docs/**
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- docs/**
- '*.md'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12, 14, 16]

node-version:
- 10
- 12
- 14
- 16
services:
postgres:
image: postgres:11-alpine
Expand All @@ -25,45 +26,43 @@ jobs:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
ports:
# will assign a random free host port
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

- '5432:5432'
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: |
npm install

- name: CI environment setup
run: |
npm i node-gyp
sudo apt-get install -yqq libpq-dev postgresql-client
chmod 600 .pgpass
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

- name: Check licenses
run: |
npm run license-checker --if-present
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: |
npm install
- name: CI environment setup
run: >
npm i node-gyp

- name: Run tests
run: |
npm run test:ci
sudo apt-get install -yqq libpq-dev postgresql-client

- name: Coveralls Parallel
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}
chmod 600 .pgpass

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
- name: Check licenses
run: |
npm run license-checker --if-present
- name: Run tests
run: |
npm run test:ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}
coverage:
needs: test
runs-on: ubuntu-latest
Expand All @@ -73,11 +72,13 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@v2.7.1
- uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}