Skip to content

Commit

Permalink
Merge pull request #407 from timgit/gh-ci
Browse files Browse the repository at this point in the history
GitHub Actions CI
  • Loading branch information
timgit committed Jul 2, 2023
2 parents 1e405e5 + 26036ac commit 86bd903
Show file tree
Hide file tree
Showing 9 changed files with 400 additions and 817 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,55 @@
on: [ "pull_request" ]

name: CI

jobs:
container-job:
runs-on: ubuntu-latest
container: node:18
strategy:
matrix:
node: [ 16, 18 ]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install
run: npm install

- name: Test
run: npm run cover
env:
POSTGRES_HOST: postgres

- 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"
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,5 @@ node_modules
.nyc_output
.vscode
*.tgz
*.log
*.log
coverage
1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -4,5 +4,4 @@
docs
test
.editorconfig
.travis.yml
*.tgz
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@ Queueing jobs in Node.js using PostgreSQL like a boss.

[![PostgreSql Version](https://img.shields.io/badge/PostgreSQL-11+-blue.svg?maxAge=2592000)](http://www.postgresql.org)
[![npm version](https://badge.fury.io/js/pg-boss.svg)](https://badge.fury.io/js/pg-boss)
[![Build Status](https://app.travis-ci.com/timgit/pg-boss.svg?branch=master)](https://app.travis-ci.com/github/timgit/pg-boss)
![Build](https://github.com/timgit/pg-boss/actions/workflows/ci.yml/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/timgit/pg-boss/badge.svg?branch=master)](https://coveralls.io/github/timgit/pg-boss?branch=master)

```js
Expand Down

0 comments on commit 86bd903

Please sign in to comment.