Bump to v4.1.9 #3203
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: CI/CD | |
on: | |
push: | |
paths-ignore: | |
- package.json | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --prefer-offline | |
- name: Build | |
run: yarn build | |
- name: Check definition files | |
run: yarn check-definition-files | |
- name: Lint | |
run: yarn lint | |
- name: Test | |
run: yarn test | |
visual-test: | |
name: visual-test (${{ matrix.shard }}/${{ strategy.job-total }}) | |
strategy: | |
matrix: | |
shard: [1, 2, 3, 4] | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.29.0-focal | |
options: --user 1001 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --prefer-offline | |
- name: Build storybook | |
run: yarn storybook:build:test | |
- name: Run Playwright tests | |
run: yarn start-server-and-test 'npx http-server ./storybook-static -p 6006' 6006 'npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }}' | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
deploy: | |
needs: validate | |
if: startsWith(github.ref, 'refs/heads/feature/') || github.ref == 'refs/heads/v4' | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --prefer-offline | |
- name: Deploy to Chromatic | |
id: chromatic | |
uses: chromaui/action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
buildScriptName: storybook:build | |
- name: Publish as comment | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
Storybook Preview: ${{steps.chromatic.outputs.storybookUrl}} |