Skip to content

Commit

Permalink
Test with a GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
atjn committed Apr 12, 2021
1 parent 208c9ab commit ad19bc2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on: [push, pull_request]

jobs:

test:

strategy:
fail-fast: false
matrix:
node-version: [14.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- node-version: 15.x
os: ubuntu-latest

runs-on: ${{ matrix.os }}

steps:

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

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

- name: Use npm cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Test code
run: npm test

0 comments on commit ad19bc2

Please sign in to comment.