Skip to content

Commit

Permalink
CI: change travis to github actions (indutny#241)
Browse files Browse the repository at this point in the history
* Create nodejs.yml

* ci: remove travis config

* ci: split actions to test/lint

Co-authored-by: Eric Ramos <[email protected]>
  • Loading branch information
fanatid and ericramos1980 authored Feb 1, 2020
1 parent 00d5851 commit 51c45d6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 18 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on: [push, pull_request]

env:
CI: true

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 8
- 10
- 12
steps:
- name: Fetch code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Restore node_modules cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}

- name: Install dependencies
run: npm install --ignore-scripts

- name: Run tests
run: npm run unit

lint:
name: Run lint
runs-on: ubuntu-latest
steps:
- name: Fetch code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Restore node_modules cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}

- name: Install dependencies
run: npm install --ignore-scripts

- name: Run lint command
run: npm run lint
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

0 comments on commit 51c45d6

Please sign in to comment.