Skip to content

Created BccSpinner

Created BccSpinner #47

name: Run Unit Tests
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
paths:
- design-library/**
- .github/workflows/design-library-tests.yml
workflow_call:
env:
CI: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: design-library/.node-version
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: design-library/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: design-library
- name: Run Unit Tests
run: npm run test:unit
working-directory: design-library
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: design-library/.node-version
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: design-library/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: design-library
- name: Lint
run: npm run lint
working-directory: design-library
- name: Type Check
run: npm run type-check
working-directory: design-library