Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Node.js ${{ matrix.node }} + mongoDB ${{ matrix.mongodb }}
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 10
- 12
- 14
mongodb:
- 3.6
- 4.0
- 4.2
- 4.4
services:
mongodb:
image: mongo:${{ matrix.mongodb }}
ports:
- 27017:27017
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test-cover
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node }}-mongodb-${{ matrix.mongodb }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Submit coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"scripts": {
"lint": "./node_modules/.bin/eslint --ignore-path .gitignore '**/*.js'",
"lint:fix": "npm run lint -- --fix",
"test": "npm run lint && node_modules/.bin/mocha",
"test-cover": "npm run lint && node_modules/nyc/bin/nyc.js --temp-dir=coverage -r text -r lcov node_modules/mocha/bin/_mocha"
"test": "mocha",
"test-cover": "nyc --temp-dir=coverage -r text -r lcov npm test"
},
"repository": "git://github.com/share/sharedb-mongo.git",
"author": "Nate Smith and Joseph Gentle",
Expand Down