Skip to content

Commit

Permalink
add GH action CI
Browse files Browse the repository at this point in the history
  • Loading branch information
timgit committed Jul 2, 2023
1 parent dd853d4 commit f62bdb1
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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"

0 comments on commit f62bdb1

Please sign in to comment.