chore(deps): update storybook monorepo to v7.6.12 #15166
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@v4 | |
- uses: actions/setup-node@v4 | |
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@v4 | |
- uses: actions/setup-node@v4 | |
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: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Install browser dependencies | |
run: yarn playwright install-deps | |
- name: Run tests | |
run: yarn test | |
env: | |
NODE_ENV: production | |
- name: Store coverage | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: coverage/ | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Run build | |
run: yarn build | |
env: | |
STORYBOOK_COMPONENTS_VERSION: ${{ github.event.pull_request.head.sha || github.sha }} | |
- name: Store storybook artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: storybook | |
path: dist/storybook/ | |
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@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Generate chromatic stories | |
run: yarn generate:chromatic-stories | |
- uses: actions/github-script@v7 | |
id: version | |
with: | |
script: | | |
const sha = context.payload.pull_request?.head.sha ?? context.sha; | |
return `${require('./package.json').version}-rev.${sha.substring(0, 10)}`; | |
result-encoding: string | |
- name: Create versioned storybook for chromatic | |
run: STORYBOOK_COMPONENTS_VERSION=${{ steps.version.outputs.result }} yarn build:storybook | |
env: | |
CHROMATIC: true | |
- name: Publish to Chromatic | |
id: chromatic-publish | |
uses: chromaui/action@v1 | |
with: | |
projectToken: ${{ secrets.CHROMATIC_TOKEN }} | |
storybookBuildDir: dist/storybook | |
exitOnceUploaded: true | |
exitZeroOnChanges: true | |
zip: true |