From 257c580d407f2da82da302f8674dd8618f1dd578 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 7 Oct 2019 17:20:57 +0300 Subject: [PATCH] Switch to GitHub Actions CI. --- .github/workflows/test.yml | 42 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 14 ------------- README.md | 12 +++++------ appveyor.yml | 27 ------------------------ package-lock.json | 32 ----------------------------- package.json | 4 +--- 6 files changed, 48 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..548aed6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Tests +on: [push, pull_request] +env: + CI: true + +jobs: + run: + name: Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + # switch to `8` when https://github.com/actions/setup-node/issues/27 is fixed + node: [8.16.1, 10, 12] + os: [ubuntu-latest, windows-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v1 + with: + fetch-depth: 5 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - run: node --version + - run: npm --version + + - name: Install npm dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Run Coveralls + uses: coverallsapp/github-action@master + if: startsWith(matrix.os, 'ubuntu') && matrix.node == 10 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c1288ee..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js - -git: - depth: 5 - -node_js: - - "8" - - "10" - - "12" - -cache: npm - -after_success: - - if [[ "$TRAVIS_NODE_VERSION" = "10" ]]; then npm run coveralls; fi diff --git a/README.md b/README.md index 4073843..4e432bf 100644 --- a/README.md +++ b/README.md @@ -81,14 +81,12 @@ Run `inline-critical --help` to see the list of options. MIT [npm-url]: https://npmjs.org/package/inline-critical -[npm-image]: https://badge.fury.io/js/inline-critical.svg -[travis-url]: https://travis-ci.org/bezoerb/inline-critical -[travis-image]: https://secure.travis-ci.org/bezoerb/inline-critical.svg?branch=master -[appveyor-url]: https://ci.appveyor.com/project/bezoerb/inline-critical/branch/master -[appveyor-image]: https://ci.appveyor.com/api/projects/status/qb9esocjkpp6hw3q/branch/master?svg=true +[npm-image]: https://img.shields.io/npm/v/inline-critical.svg +[ci-url]: https://github.com/bezoerb/inline-critical/actions?workflow=Tests +[ci-image]: https://github.com/bezoerb/inline-critical/workflows/Tests/badge.svg [depstat-url]: https://david-dm.org/bezoerb/inline-critical -[depstat-image]: https://david-dm.org/bezoerb/inline-critical.svg +[depstat-image]: https://img.shields.io/david/bezoerb/inline-critical.svg [dlcounter-url]: https://www.npmjs.com/package/inline-critical [dlcounter-image]: https://img.shields.io/npm/dm/inline-critical.svg [coveralls-url]: https://coveralls.io/github/bezoerb/inline-critical?branch=master -[coveralls-image]: https://coveralls.io/repos/github/bezoerb/inline-critical/badge.svg?branch=master +[coveralls-image]: https://img.shields.io/coveralls/github/bezoerb/inline-critical/master.svg diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 7fb42f2..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: "{build}" - -shallow_clone: true - -environment: - PLATFORM: x64 - matrix: - - NODEJS_VERSION: "8" - - NODEJS_VERSION: "10" - - NODEJS_VERSION: "12" - -install: - - ps: Install-Product node $env:NODEJS_VERSION $env:PLATFORM - - npm ci - -build: off - -test_script: - - node --version - - npm --version - - npm test - -matrix: - fast_finish: true - -cache: - - '%APPDATA%\npm-cache\ -> appveyor.yml,package.json,package-lock.json' diff --git a/package-lock.json b/package-lock.json index 4b4b3b1..15be020 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1380,20 +1380,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "coveralls": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.6.tgz", - "integrity": "sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA==", - "dev": true, - "requires": { - "growl": "~> 1.10.0", - "js-yaml": "^3.13.1", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.86.0" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -3508,12 +3494,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -4890,12 +4870,6 @@ "package-json": "^6.3.0" } }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -5030,12 +5004,6 @@ "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", "dev": true }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", diff --git a/package.json b/package.json index cfed3b6..e2393d0 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "scripts": { "jest": "jest --coverage", "xo": "xo", - "test": "npm run xo && npm run jest", - "coveralls": "cat ./coverage/lcov.info | coveralls" + "test": "npm run xo && npm run jest" }, "files": [ "index.js", @@ -52,7 +51,6 @@ "uglify-js": "^3.6.0" }, "devDependencies": { - "coveralls": "^3.0.6", "execa": "^1.0.0", "fs-extra": "^8.1.0", "jest": "^24.9.0",