Skip to content

Update deps

Update deps #78

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [16, 18, 20]
target: [test, coverage]
services:
postgres:
image: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
NODE_CONFIG: '{"db": {"host": "localhost"}}'
steps:
- name: Get CouchDB
run: |
( cd; git clone "https://github.com/davedoesdev/build-couchdb-gha.git"; cd build-couchdb-gha; wget -O - "https://github.com/davedoesdev/build-couchdb-gha/releases/download/$(git tag | tail -n 1)/couchdb.tar.gz" | tar -zx; mkdir "$HOME/couchdb"; ln -s "$PWD/couchdb" "$HOME/couchdb/rel" )
ls -l "$HOME/couchdb/rel/couchdb/bin"
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: npm install
- name: Lint
run: npx grunt lint
- name: Create database
run: psql -c 'create database "pub-keystore";'
- name: Apply migrations
run: npx node-pg-migrate up
- name: ${{ matrix.target }}
run: npx grunt ${{ matrix.target }}
- name: Coveralls
if: matrix.target == 'coverage'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}