Skip to content

Merge pull request #40 from Smart-Home-Guard/fix/diagram-threshold #93

Merge pull request #40 from Smart-Home-Guard/fix/diagram-threshold

Merge pull request #40 from Smart-Home-Guard/fix/diagram-threshold #93

Workflow file for this run

name: test
on:
push:
branches: [ main ]
paths:
- '*/**/*.tsx'
- '*/**/*.ts'
pull_request:
branches: [ main ]
paths:
- '*/**/*.tsx'
- '*/**/*.ts'
jobs:
test:
runs-on: [ ubuntu-latest ]
strategy:
matrix:
node-version: [19.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node version ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn
run: npm i -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir
run: echo "CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ${{ steps.yarn-cache-dir.outputs.CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ env.cache-name }}-
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Build with Node ${{ matrix.node-version }}
run: yarn
- name: Test
run: yarn test