From f26311992efbd859eb89184bcab2b3902e89a4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 10 May 2020 10:26:06 +0200 Subject: [PATCH] chore: replace Travis and AppVeyor with GitHub Actions (#414) --- .github/workflows/nodejs.yml | 44 ++++++++++++++++++++++++++++++++++++ .travis.yml | 14 ------------ README.md | 3 +-- appveyor.yml | 25 -------------------- 4 files changed, 45 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/nodejs.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 00000000..d66ef49e --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,44 @@ +name: Node.js CI + +on: + push: + branches: + - master + pull_request: + +jobs: + lint: + name: Lint using ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: npm install and lint + run: | + npm install + npm run lint + + test: + name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node-version: [10.x, 12.x, 14.x] + # TODO(targos): fix and add windows-latest + os: [ubuntu-latest, macOS-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install and test + run: | + npm install + npm run coverage-all + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d77bce9e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -node_js: - - "10" - - "12" - - "13" -cache: - directories: - - node_modules -script: - - npm run lint - - npm run coverage-all -after_success: - - npm install codecov - - npm run report-coverage diff --git a/README.md b/README.md index ba2eb957..1d011e34 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Node.js Core Utilities [![npm](https://img.shields.io/npm/v/node-core-utils.svg?style=flat-square)](https://npmjs.org/package/node-core-utils) -[![Build Status](https://img.shields.io/travis/nodejs/node-core-utils.svg?style=flat-square)](https://travis-ci.org/nodejs/node-core-utils) -[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/joyeecheung/node-core-utils/master.svg?style=flat-square&logo=appveyor)](https://ci.appveyor.com/project/nodejs/node-core-utils/history) +[![Build Status](https://img.shields.io/github/workflow/status/nodejs/node-core-utils/Node.js%20CI/master?style=flat-square)](https://github.com/nodejs/node-core-utils/workflows/Node.js%20CI/badge.svg?branch=master) [![codecov](https://img.shields.io/codecov/c/github/nodejs/node-core-utils.svg?style=flat-square)](https://codecov.io/gh/nodejs/node-core-utils) [![Known Vulnerabilities](https://snyk.io/test/github/nodejs/node-core-utils/badge.svg?style=flat-square)](https://snyk.io/test/github/nodejs/node-core-utils) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index abccb719..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Test against the latest version of this Node.js version -environment: - nodejs_version: "8" - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version - # install modules - - npm install --no-package-lock - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm run lint - - npm run coverage-all - -cache: - - node_modules - -# Don't actually build. -build: off