Add GitHub actions testing

Fix yaml indentation and add name

Fix test script name

Add lcov path

Move coveage to separate job

Debug coverage

Fix coverage testing

Update badge

Fix badge
This commit is contained in:
James Sumners 2019-09-15 08:36:17 -04:00
parent 4b2e55e111
commit 7b5085f9d5
No known key found for this signature in database
GPG Key ID: DD9AAE30F864776B
4 changed files with 54 additions and 43 deletions

51
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: 'Lint And Test'
on:
pull_request:
branches:
- master
- next
jobs:
lint:
name: Lint Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Install Packages
run: npm install
- name: Lint Code
run: npm run lint:ci
run_tests:
name: Unit Tests
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node:
- 10.13.0
- 10.x
- 12.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
- name: Run Tests
run: npm run test:ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel: true
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

View File

@ -1,41 +0,0 @@
sudo: false
git:
depth: 3
branches:
only:
- next
- master
language: node_js
cache:
npm: true
stages:
- lint
- test
jobs:
include:
- stage: lint ✨
script: npm run lint:ci
node_js: lts/*
- stage: test 👩🏽‍💻
os: linux
script: npm run test:cov
node_js: node
- os: linux
script: npm run test:cov
node_js: lts/*
- os: windows
script: npm run test:cov
node_js: node
- os: windows
script: npm run test:cov
node_js: lts/*

View File

@ -1,6 +1,6 @@
# LDAPjs
[![Build Status](https://travis-ci.org/ldapjs/node-ldapjs.svg)](https://travis-ci.org/ldapjs/node-ldapjs)
[![Build Status](https://github.com/ldapjs/node-ldapjs/workflows/main/badge.svg)]
[![Coverage Status](https://coveralls.io/repos/github/ldapjs/node-ldapjs/badge.svg?branch=ci-cleanup)](https://coveralls.io/github/ldapjs/node-ldapjs?branch=ci-cleanup)
LDAPjs makes the LDAP protocol a first class citizen in Node.js.

View File

@ -14,7 +14,7 @@
"lib": "./lib"
},
"engines": {
"node": ">=10.16.0"
"node": ">=10.13.0"
},
"dependencies": {
"abstract-logging": "^1.0.0",
@ -35,6 +35,7 @@
},
"scripts": {
"test": "tap --no-cov",
"test:ci": "tap --coverage-report=lcovonly",
"test:cov": "tap",
"test:cov:html": "tap --coverage-report=html",
"test:watch": "tap -n -w --no-coverage-report",