Skip to content

Commit edbe2fa

Browse files
authored
ci: use github actions (#302)
* ci: use github actions * test: support node < 10 * docs: use new badge
1 parent 54a115b commit edbe2fa

File tree

6 files changed

+80
-392
lines changed

6 files changed

+80
-392
lines changed

.github/workflows/node.js.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This workflow will do a clean install of node dependencies, and run the linter
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
# Any additional branches here will currently be treated as release (or maintenance) branches.
8+
# if the need to run jobs on other branches emerges, then the release job will need a better
9+
# condition expression.
10+
push:
11+
branches: master
12+
pull_request:
13+
branches: master
14+
15+
jobs:
16+
lint:
17+
# https://github.community/t/github-actions-does-not-respect-skip-ci/17325/9
18+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
19+
runs-on: ubuntu-latest
20+
21+
services:
22+
redis:
23+
image: redis
24+
ports:
25+
- 6379:6379
26+
options: >-
27+
--health-cmd "redis-cli ping"
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 5
31+
32+
strategy:
33+
matrix:
34+
node-version: [4.0.x, 8.x, 10.x, 12.x, 14.x]
35+
include:
36+
- node-version: 14.x
37+
report-coverage: true
38+
39+
steps:
40+
- uses: actions/checkout@v2
41+
with:
42+
# For commitlint; ideally this would only check out the feature branch's history, but
43+
# that's not currently an option.
44+
fetch-depth: ${{ github.event_name == 'push' }}
45+
- name: Cache dependencies
46+
id: cache
47+
uses: actions/cache@v2
48+
with:
49+
path: node_modules
50+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
51+
- name: Use Node.js 14 for dependencies
52+
uses: actions/setup-node@v1
53+
if: '!steps.cache.outputs.cache-hit'
54+
with:
55+
node-version: 14.x
56+
- name: Install dependencies
57+
if: '!steps.cache.outputs.cache-hit'
58+
run: npm ci
59+
- name: Use Node.js ${{ matrix.node-version }}
60+
uses: actions/setup-node@v1
61+
with:
62+
node-version: ${{ matrix.node-version }}
63+
- run: npm run ci --if-present
64+
env:
65+
BEE_QUEUE_TEST_REDIS: redis://localhost:6379
66+
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
67+
- name: Report to Coveralls
68+
uses: coverallsapp/github-action@master
69+
if: matrix.report-coverage
70+
with:
71+
github-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a name="top"></a>
22
![bee-queue logo](https://raw.githubusercontent.com/bee-queue/bee-queue/master/bee-queue.png)
3-
[![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]
3+
[![npm Version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coverage Status][coveralls-image]][coveralls-url]
44

55
A simple, fast, robust job/task queue for Node.js, backed by Redis.
66

@@ -900,7 +900,7 @@ You'll need a local redis server to run the tests. Note that running the tests m
900900

901901
[npm-image]: https://img.shields.io/npm/v/bee-queue.svg?style=flat
902902
[npm-url]: https://www.npmjs.com/package/bee-queue
903-
[travis-image]: https://img.shields.io/travis/bee-queue/bee-queue.svg?style=flat
904-
[travis-url]: https://travis-ci.org/bee-queue/bee-queue
903+
[travis-image]: https://github.com/bee-queue/bee-queue/workflows/Node.js%20CI/badge.svg
904+
[travis-url]: https://github.com/bee-queue/bee-queue/actions
905905
[coveralls-image]: https://coveralls.io/repos/bee-queue/bee-queue/badge.svg?branch=master
906906
[coveralls-url]: https://coveralls.io/r/bee-queue/bee-queue?branch=master

0 commit comments

Comments
 (0)