Skip to content

Commit

Permalink
ci: add github workflow for running tests against PRs and master
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Mar 19, 2024
1 parent 6e3e0e3 commit 73b2c49
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
branches:
- master
pull_request:

permissions:
contents: read

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm clean-install
- name: Test code
run: npm test

0 comments on commit 73b2c49

Please sign in to comment.