From 8a9defd968d15b79bb05569ca9d8b16aa2f79d01 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 25 Nov 2021 07:08:32 +0100 Subject: [PATCH] Switch to gihub CI (#117) * Switch to gihub CI support node 12, 14, 16 * fix coverage * Update package.json * fix --- .github/dependabot.yml | 20 +++------------ .github/workflows/tester.yml | 50 ++++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- .travis.yml | 21 --------------- package.json | 4 +-- 5 files changed, 58 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/tester.yml delete mode 100644 .travis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e01ccd0..f3afc1b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,19 +4,7 @@ updates: directory: "/" schedule: interval: daily - open-pull-requests-limit: 20 - versioning-strategy: widen - ignore: - - dependency-name: postcss - versions: - - 8.2.10 - - 8.2.12 - - 8.2.4 - - 8.2.5 - - 8.2.6 - - 8.2.7 - - 8.2.8 - - 8.2.9 - - dependency-name: sinon - versions: - - 10.0.0 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily \ No newline at end of file diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..93d29af --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,50 @@ +name: Tester + +on: [push, pull_request] + +jobs: + tester: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: ['12.x', '14.x', '16.x'] + fail-fast: false + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install + - name: Test + run: npm test + env: + CI: true + coverage: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node-version: ['14.x'] + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install + - name: Coverage + run: npm run test-cov + env: + CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0cbd2b4..2b76fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ tmp/ *.log .idea/ -.nyc_output/ \ No newline at end of file +.nyc_output/ +coverage/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6d47c8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: node_js - -sudo: false - -cache: - apt: true - directories: - - node_modules - -node_js: - - "10" - - "12" - - "node" - -script: - - npm run eslint - - npm run test-cov - -after_script: - - npm install coveralls - - nyc report --reporter=text-lcov | coveralls diff --git a/package.json b/package.json index 0cc329b..5bc7e55 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "eslint": "eslint .", "test": "mocha test/index.js", - "test-cov": "nyc npm run test" + "test-cov": "nyc --reporter=lcovonly npm test" }, "directories": { "lib": "./lib" @@ -45,6 +45,6 @@ "sinon": "^9.0.2" }, "engines": { - "node": ">=8.6.0" + "node": ">=12" } }