Skip to content

Commit

Permalink
feat: add tests to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm committed Sep 28, 2022
1 parent 32814ba commit f1c61f4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests for PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

jobs:
test:
name: 'Node.js v${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 16
steps:
- uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node }}'
- uses: actions/checkout@v2
- name: 'Cache node_modules'
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-
- name: Install Dependencies
run: npm install
- name: Run All Node.js Tests
run: npm run test

0 comments on commit f1c61f4

Please sign in to comment.