37 lines
711 B
YAML
37 lines
711 B
YAML
name: Unit Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
|
id: yarn-and-build-cache
|
|
with:
|
|
path: |
|
|
build
|
|
node_modules
|
|
key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node_modules-build-
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
|
|
- name: Lint & Test
|
|
run: |
|
|
yarn install
|
|
yarn lint
|
|
yarn test:unit
|