🔧 Fix the storybook CI #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
push: { branches: [dev, main] } | |
pull_request: | |
jobs: | |
install: | |
timeout-minutes: 10 | |
strategy: | |
matrix: { node: ["18.x"], os: [ubuntu-latest] } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- 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- | |
- if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }} | |
name: Install dependencies | |
run: yarn --immutable | |
ui: | |
needs: install | |
timeout-minutes: 60 | |
strategy: | |
matrix: { node: ["18.x"], os: [ubuntu-latest] } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Verify linting | |
run: yarn lint | |
- name: Build Pioneer | |
run: yarn build | |
- name: Run tests | |
run: node --max_old_space_size=7000 --expose-gc $(yarn bin jest) --logHeapUsage --silent | |
working-directory: packages/ui |