From adfc39dd2e7bdfe75f4cb5965b0b194578a80902 Mon Sep 17 00:00:00 2001 From: Marcus Lyons <10541922+marcuslyons@users.noreply.github.com> Date: Wed, 21 Apr 2021 13:10:18 -0600 Subject: [PATCH] Move to GitHub Actions (#196) Ref Level/community#99 --- .github/dependabot.yml | 4 ++++ .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 17 ----------------- README.md | 4 ++-- package.json | 3 +-- 6 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 35c4756..6f12a34 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,7 @@ updates: interval: monthly ignore: - dependency-name: dependency-check + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..739e521 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node: [10, 12, 14] + name: Node ${{ matrix.node }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Use node ${{ matrix.node }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: Install + run: npm install + - name: Test + run: npm test + - name: Coverage + run: npm run coverage + - name: Codecov + uses: codecov/codecov-action@v1 + with: + file: coverage/lcov.info diff --git a/.gitignore b/.gitignore index 533fe24..a446924 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules yarn.lock .nyc_output/ +coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9272650..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false - -language: node_js - -os: - - osx - - linux - -node_js: - - 10 - - 12 - - 14 - -after_success: npm run coverage - -notifications: - email: false diff --git a/README.md b/README.md index fceabbc..5d89140 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ [![level badge][level-badge]](https://github.com/Level/awesome) [![npm](https://img.shields.io/npm/v/level.svg?label=&logo=npm)](https://www.npmjs.com/package/level) [![Node version](https://img.shields.io/node/v/level.svg)](https://www.npmjs.com/package/level) -[![Travis](https://img.shields.io/travis/com/Level/level.svg?logo=travis&label=)](https://travis-ci.com/Level/level) [![AppVeyor](https://img.shields.io/appveyor/ci/Level/level.svg?logo=appveyor&label=)](https://ci.appveyor.com/project/Level/level) -[![Coverage Status](https://coveralls.io/repos/github/Level/level/badge.svg)](https://coveralls.io/github/Level/level) +[![Test](https://github.com/Level/level/actions/workflows/test.yml/badge.svg)](https://github.com/Level/level/actions/workflows/test.yml) +[![Coverage Status](https://codecov.io/gh/Level/level/branch/master/graph/badge.svg)](https://codecov.io/gh/Level/level) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![npm](https://img.shields.io/npm/dm/level.svg?label=dl)](https://www.npmjs.com/package/level) [![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) diff --git a/package.json b/package.json index 7edad2d..62f3e47 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "test": "standard && nyc node test.js", "test-browsers-local": "airtap --verbose test-browser.js", - "coverage": "nyc report --reporter=text-lcov | coveralls", + "coverage": "nyc report -r lcovonly", "hallmark": "hallmark --fix", "dependency-check": "dependency-check --no-dev . browser.js", "prepublishOnly": "npm run dependency-check" @@ -29,7 +29,6 @@ "devDependencies": { "airtap": "^4.0.1", "airtap-playwright": "^1.0.1", - "coveralls": "^3.0.2", "dependency-check": "^4.1.0", "hallmark": "^3.0.0", "level-community": "^3.0.0",