From e81311ba146613b8ad945526f9fc0250896892d0 Mon Sep 17 00:00:00 2001 From: William Belle Date: Thu, 11 Mar 2021 20:48:52 +0100 Subject: [PATCH 1/2] migrate from Travis CI to GitHub Actions --- .github/workflows/build.yml | 50 ++++++++++++++++++++++++++++++++++++ .github/workflows/nodejs.yml | 22 ---------------- .travis.yml | 13 ---------- package.json | 3 ++- 4 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/nodejs.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..da0ba50 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +# (c) William Belle, 2021. +# See the LICENSE file for more details. + +name: Build + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + name: Node.js ${{ matrix.node }} CI + + strategy: + fail-fast: false + matrix: + node: [ '10', '12', '14', '15' ] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Install, test and coverage + run: | + npm i + npm t + npm run coveralls + + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: run-node-${{ matrix.node }} + parallel: true + + finish: + needs: build + runs-on: ubuntu-latest + name: Coveralls + + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 5b23744..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,22 +0,0 @@ -# (c) William Belle, 2020. -# See the LICENSE file for more details. - -name: Node.js CI - -on: [push] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node: [ '10', '12', '14', '15' ] - name: Node.js ${{ matrix.node }} CI - steps: - - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - run: npm i - - run: npm t diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3c84e74..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Original work (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017-2018. -# Modified work (c) William Belle, 2018-2020. -# See the LICENSE file for more details. - -language: node_js -node_js: - - "15" - - "14" - - "12" - - "10" -after_success: - - npm install coveralls mocha-lcov-reporter - - npm run coveralls diff --git a/package.json b/package.json index 46f8f27..3a5f04c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "scripts": { "test": "eslint . && mocha", "coverage": "nyc mocha", - "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls" + "coveralls": "npm run coverage && nyc report --reporter=lcov" }, "devDependencies": { "chai": "^4.2.0", @@ -32,6 +32,7 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.2", "mocha": "^8.2.0", + "mocha-lcov-reporter": "^1.3.0", "nyc": "^15.1.0", "rewire": "^5.0.0" }, From b28e274df9fbb9bcd5c3e64807196f8bffe994a0 Mon Sep 17 00:00:00 2001 From: William Belle Date: Thu, 11 Mar 2021 20:58:04 +0100 Subject: [PATCH 2/2] update badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c1663a..d3f8363 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@

- - Travis Status + + Build Status Coverage Status