Skip to content

Merge pull request #47 from Reasonote/staging #71

Merge pull request #47 from Reasonote/staging

Merge pull request #47 from Reasonote/staging #71

Workflow file for this run

name: Unit Tests
on:
push:
branches: [ main, staging ]
pull_request:
branches: [ main, staging ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install project dependencies
run: yarn --prefer-offline --frozen-lockfile
- name: Run Unit Tests
run: yarn test:unit