Skip to content

add GH action CI

add GH action CI #1

Workflow file for this run

on: ["push", "pull_request"]
name: CI
jobs:
container-job:
runs-on: ubuntu-latest
container: node:18
strategy:
matrix:
node_version:
- 18
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@3
- name: Set up Node.js
uses: actions/setup-node@3
with:
node-version: ${{matrix.node_version}}.x
- name: Install
run: npm install
- name: Test
run: npm run cover
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: container-job
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-1,run-2"