chore(deps): update storybook monorepo to v7.4.5 #11405
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: Continuous Integration | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Run eslint | |
run: yarn lint | |
integrity: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: 'Integrity: Verify workspace integrity' | |
run: yarn integrity | |
- name: 'Integrity: Assert no changes (run `yarn integrity` if this fails)' | |
run: git diff --exit-code | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Attempt to prevent "The operation was canceled" error | |
- name: Set Swap Space | |
uses: pierotofy/set-swap-space@master | |
with: | |
swap-size-gb: 5 | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Run tests | |
# Try yarn test:prod up to three times, if it fails and exit with the exit code from the last execution | |
run: for i in $(seq 1 3); do [ $i -gt 1 ] && sleep 5; yarn test:prod && s=0 && break || s=$?; done; (exit $s) | |
env: | |
NODE_OPTIONS: '--max-old-space-size=6144' | |
- name: Store coverage | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: coverage/ | |
- name: Save PR number | |
if: github.event_name == 'pull_request' | |
run: | | |
mkdir -p ./pr | |
echo ${{ github.event.number }} > ./pr/NR | |
- name: Store PR number | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pr | |
path: pr/ | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Run build | |
run: STORYBOOK_COMPONENTS_VERSION=$GITHUB_SHA yarn build | |
- name: Store stencil artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: stencil | |
path: | | |
dist/ | |
hydrate/ | |
loader/ | |
react-library/dist/ | |
- name: Store storybook artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: storybook | |
path: storybook-static/ | |
chromatic: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false | |
needs: [build, lint, test] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Restore stencil artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: stencil | |
path: . | |
- name: Run build | |
run: yarn build:chromatic-stories && yarn build:storybook | |
- name: Publish to Chromatic | |
id: chromatic-publish | |
uses: chromaui/action@v1 | |
with: | |
projectToken: ${{ secrets.CHROMATIC_TOKEN }} | |
storybookBuildDir: storybook-static | |
exitOnceUploaded: true | |
exitZeroOnChanges: true |