Skip to content

Commit

Permalink
Add test job to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan committed Aug 24, 2023
1 parent a31f88b commit 6022357
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: NPM build + test

on: [push]
on:
push

jobs:
build:
Expand All @@ -26,4 +26,28 @@ jobs:

- run: npm ci
- run: npm run build

test:
runs-on: ubuntu-latest
strategy:
matrix:
# @TODO add 16/18
node: [ '14' ]

name: Node ${{ matrix.node }} build
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles('**/package-lock.lock') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: npm ci
- run: npm run lint
- run: npx vitest run

0 comments on commit 6022357

Please sign in to comment.