Skip to content

[ Product Filter ] - FRONT #5833

[ Product Filter ] - FRONT

[ Product Filter ] - FRONT #5833

Workflow file for this run

# based on .github/workflows/chromatic.yml
# Workflow name
name: 'Chromatic'
# Event for the workflow
on:
pull_request:
types: [opened,edited,reopened,synchronize,labeled]
paths:
- '_dev/**'
push:
branches:
- master
env:
PNPM_VERSION: 8
NODE_VERSION: 20
# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
if: github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'waiting for UX') && github.event.pull_request.head.repo.full_name == 'PrestaShopCorp/psxmarketingwithgoogle')
# Job steps
steps:
# 👇 Version 2 of the action
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: '_dev/pnpm-lock.yaml'
- name: Install dependencies
working-directory: ./_dev
run: pnpm install
# Tests are mandatory to build storybook
- name: Run tests
working-directory: ./_dev/apps/ui
run: npm run test:generate-output
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
workingDir: ./_dev/apps/ui
token: ${{ secrets.GITHUB_TOKEN }}
# 👇 Chromatic projectToken
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}