Skip to content

Commit

Permalink
Add testing workflow, nuke .travis.yml (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai authored Dec 24, 2021
1 parent 214cc18 commit fea5926
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# yamllint disable rule:line-length
# yamllint disable rule:braces
name: CI

on:
pull_request:
push:
branches:
- main
- master

jobs:
tests:
name: Testing with Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- '6.x'
- '8.x'
- '10.x'
- '12.x'
- '14.x'
- '15.x'
- '16.x'
- '17.x'

steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ matrix.node-version }}-${{ hashFiles('package*.json') }}
restore-keys: |
npm-${{ matrix.node-version }}-
- name: Install dependencies
run: |
npm install --ignore-scripts
- name: Build
run: |
npm run build --if-present
- name: Run tests
run: |
npm test
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

0 comments on commit fea5926

Please sign in to comment.