From 7b5085f9d5c01f90bf63fd8834316a6ae77228ea Mon Sep 17 00:00:00 2001 From: James Sumners Date: Sun, 15 Sep 2019 08:36:17 -0400 Subject: [PATCH] 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 --- .github/workflows/main.yml | 51 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 41 ------------------------------ README.md | 2 +- package.json | 3 ++- 4 files changed, 54 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cd114b9 --- /dev/null +++ b/.github/workflows/main.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5eb0b39..0000000 --- a/.travis.yml +++ /dev/null @@ -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/* diff --git a/README.md b/README.md index 95964e5..90cc456 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index af75aee..d634b3b 100644 --- a/package.json +++ b/package.json @@ -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",