From 575b4a8b9b5b493cc75eda28305fa9010bf12204 Mon Sep 17 00:00:00 2001 From: Marcus Lyons <10541922+marcuslyons@users.noreply.github.com> Date: Wed, 21 Apr 2021 13:11:40 -0600 Subject: [PATCH] Move to GitHub Actions (#101) Ref Level/community#99 --- .github/dependabot.yml | 4 ++++ .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 15 --------------- README.md | 5 +++-- package.json | 3 +-- 6 files changed, 35 insertions(+), 19 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 3358ab1..896d0fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules level-test-* .nyc_output/ +coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 17fd614..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - 10 - - 12 - - 14 - -before_script: git fetch --tags - -after_success: npm run coverage - -notifications: - email: false diff --git a/README.md b/README.md index 68bb2fe..18c3a1c 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ [![level badge][level-badge]](https://github.com/Level/awesome) [![npm](https://img.shields.io/npm/v/level-packager.svg?label=&logo=npm)](https://www.npmjs.com/package/level-packager) [![Node version](https://img.shields.io/node/v/level-packager.svg)](https://www.npmjs.com/package/level-packager) -[![Travis](https://img.shields.io/travis/com/Level/packager.svg?logo=travis&label=)](https://travis-ci.com/Level/packager) -[![Coverage Status](https://coveralls.io/repos/github/Level/packager/badge.svg)](https://coveralls.io/github/Level/packager) +[![Test](https://github.com/Level/packager/actions/workflows/test.yml/badge.svg)](https://github.com/Level/packager/actions/workflows/test.yml) +[![Coverage Status](https://codecov.io/gh/Level/packager/branch/master/graph/badge.svg)](https://codecov.io/gh/Level/packager) + [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![npm](https://img.shields.io/npm/dm/level-packager.svg?label=dl)](https://www.npmjs.com/package/level-packager) [![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) diff --git a/package.json b/package.json index 45c4c44..2addc80 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "test": "standard && hallmark && nyc node test.js", "test-browsers-local": "airtap test.js", - "coverage": "nyc report --reporter=text-lcov | coveralls", + "coverage": "nyc report -r lcovonly", "hallmark": "hallmark --fix", "dependency-check": "dependency-check . test.js abstract/*.js", "prepublishOnly": "npm run dependency-check" @@ -27,7 +27,6 @@ "devDependencies": { "airtap": "^4.0.3", "airtap-playwright": "^1.0.1", - "coveralls": "^3.0.2", "dependency-check": "^3.3.0", "hallmark": "^3.1.0", "level-community": "^3.0.0",