49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
name: Run library unit tests
|
|
|
|
on:
|
|
push:
|
|
branches: ['master']
|
|
paths: ['Frontend/library/**']
|
|
pull_request:
|
|
branches: ['master']
|
|
paths: ['Frontend/library/**']
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./
|
|
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: "Checkout source code"
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18.17.0'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install common library deps
|
|
working-directory: ./Common
|
|
run: npm ci
|
|
|
|
- name: Build common library
|
|
working-directory: ./Common
|
|
run: npm run build
|
|
|
|
- name: Install library deps
|
|
working-directory: ./Frontend/library
|
|
run: npm ci
|
|
|
|
- name: Link common library
|
|
working-directory: ./Frontend/library
|
|
run: npm link ../../Common
|
|
|
|
- name: Run frontend lib tests
|
|
working-directory: ./Frontend/library
|
|
run: npm run test
|