Move to Github Actions (#785)
* Move to Github Actions * remove Travis in favor of GitHub Actions Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com> Co-authored-by: Linus Unnebäck <linus@folkdatorn.se> Co-authored-by: Konstantin Vyatkin <tino@vtkn.io>
This commit is contained in:
parent
63d3663466
commit
29d7556870
|
@ -0,0 +1,40 @@
|
|||
name: Node.js CI
|
||||
|
||||
on:
|
||||
[pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
node: [14.x, 12.x, 10.x]
|
||||
exclude:
|
||||
# On Windows, run tests with only the LTS environments.
|
||||
- os: windows-latest
|
||||
node: 10.x
|
||||
- os: windows-latest
|
||||
node: 14.x
|
||||
# On macOS, run tests with only the LTS environments.
|
||||
- os: macOS-latest
|
||||
node: 10.x
|
||||
- os: macOS-latest
|
||||
node: 14.x
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm test
|
||||
if: matrix.node-version != '10.x'
|
||||
- run: npm run coverage
|
||||
if: matrix.node-version == '14.x' && matrix.os == 'ubuntu-latest'
|
||||
|
||||
- name: Test without coverage
|
||||
if: matrix.node-version == '10.x'
|
||||
run: |
|
||||
npm install -D esm
|
||||
npx mocha -r esm
|
|
@ -0,0 +1,25 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '*.js'
|
||||
- '**eslint**'
|
||||
- 'package.json'
|
||||
- '.github/workflows/lint.yml'
|
||||
jobs:
|
||||
xo:
|
||||
|
||||
runs-on: [ubuntu-latest]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm run lint
|
15
.travis.yml
15
.travis.yml
|
@ -1,15 +0,0 @@
|
|||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "lts/*" # Latest LTS
|
||||
- "node" # Latest Stable
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- # Linting stage
|
||||
node_js: "lts/*" # Latest LTS
|
||||
script: npm run lint
|
||||
|
||||
cache: npm
|
||||
|
||||
after_success: npm run coverage
|
|
@ -2,7 +2,7 @@
|
|||
<img src="docs/media/Banner.svg" alt="Node Fetch"/>
|
||||
<br>
|
||||
<p>A light-weight module that brings <code>window.fetch</code> to Node.js.</p>
|
||||
<a href="https://travis-ci.com/node-fetch/node-fetch"><img src="https://img.shields.io/travis/com/node-fetch/node-fetch/master?style=flat-square" alt="Build status"></a>
|
||||
<a href="https://github.com/node-fetch/node-fetch/actions"><img src="https://github.com/node-fetch/node-fetch/workflows/.github/workflows/ci.yml/badge.svg" alt="Build status"></a>
|
||||
<a href="https://coveralls.io/github/node-fetch/node-fetch"><img src="https://img.shields.io/coveralls/github/node-fetch/node-fetch?style=flat-square" alt="Coverage status"></a>
|
||||
<a href="https://packagephobia.now.sh/result?p=node-fetch"><img src="https://flat.badgen.net/packagephobia/install/node-fetch" alt="Current version"></a>
|
||||
<a href="https://www.npmjs.com/package/node-fetch"><img src="https://img.shields.io/npm/v/node-fetch?style=flat-square" alt="Install size"></a>
|
||||
|
|
Loading…
Reference in New Issue