Skip to content

Commit

Permalink
add GH ci
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Jan 17, 2022
1 parent 4115109 commit c07e3d3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI test

on:
push: {}
pull_request: {}

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
fail-fast: false

steps:
- uses: actions/checkout@v2

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

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci

- name: Execute unit tests
run: npm run test

0 comments on commit c07e3d3

Please sign in to comment.