Fix - Make loki work with Storybook8 #415
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
unit: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node from node version file | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts | |
- name: Prepare docker | |
run: docker pull yukinying/chrome-headless-browser-stable:118.0.5993.117 | |
- name: Prepare docker lambda | |
run: yarn pretest | |
- name: Run unit tests | |
run: yarn test-ci | |
static-analysis: | |
name: Static analysis | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node from node version file | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts | |
- name: Run ESLint | |
run: yarn lint | |
integration-cli: | |
name: 'Integration tests: CLI' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts | |
- name: Run integration tests | |
run: yarn workspace @loki/test-cli test | |
- name: Archive screenshots | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v1 | |
with: | |
name: cra-integration-screenshots | |
path: test/cli/generated/create-react-app/.loki | |
visual-react-dom: | |
name: 'Visual tests: React DOM' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node from node version file | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts | |
- name: Run loki | |
run: yarn workspace @loki/example-react test-ci | |
- name: Archive screenshots | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v1 | |
with: | |
name: react-example-screenshots | |
path: examples/react/.loki |