Skip to content

Bump the build group across 1 directory with 3 updates #1187

Bump the build group across 1 directory with 3 updates

Bump the build group across 1 directory with 3 updates #1187

Workflow file for this run

name: CI Build
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.ref }}
CHROMATIC_SLUG: ${{ github.repository }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
cache: yarn
node-version-file: .nvmrc
- name: Yarn Install
run: yarn
- name: Lint
run: yarn lint
- name: Jest Tests
run: yarn test --coverage
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN }}
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995
- name: Package build
run: yarn build
env:
NODE_ENV: production
- name: Storybook build
run: yarn build-storybook
env:
NODE_ENV: production
- name: Switch to PR branch
if: ${{ github.event_name == 'pull_request' && env.CHROMATIC_PROJECT_TOKEN }}
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
clean: false
fetch-depth: 0
ref: ${{ env.CHROMATIC_BRANCH }}
- name: Storybook deploy
if: ${{ env.CHROMATIC_PROJECT_TOKEN }}
uses: chromaui/action@8d925269a481085d451544f6bd9aa2ab3af55b5d
with:
autoAcceptChanges: main
branchName: ${{ env.CHROMATIC_BRANCH}}
exitZeroOnChanges: false
onlyChanged: ${{ github.event_name == 'pull_request' }}
projectToken: ${{ env.CHROMATIC_PROJECT_TOKEN }}
token: ${{ env.GITHUB_TOKEN }}