Skip to content

[fix] correct env variables and test update #1731

[fix] correct env variables and test update

[fix] correct env variables and test update #1731

name: Visual Regression Tests
#Rationale for not including it in default CI workflow, Chromatic requires 'on push' vs 'on pull request'
on:
push:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
visual-regression-tests:
name: ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- package: '@kadena/react-ui'
path: packages/libs/react-ui
projectToken: 'REACT_UI_CHROMATIC_TOKEN'
- package: '@kadena/docs'
path: packages/apps/docs
projectToken: 'DOCS_CHROMATIC_TOKEN'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 #Required to retrieve git history, needed to determine diffs.
show-progress: false
- uses: dorny/paths-filter@v2
id: changed
with:
filters: |
pathFilter:
- '${{ matrix.path }}/**'
- uses: pnpm/action-setup@v2
if: steps.changed.outputs.pathFilter == 'true'
with:
version: 8
- uses: actions/setup-node@v3
if: steps.changed.outputs.pathFilter == 'true'
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
if: steps.changed.outputs.pathFilter == 'true'
run: pnpm install
- name: Build
if: steps.changed.outputs.pathFilter == 'true'
run: pnpm run build
- name: Publish Storybook
if: steps.changed.outputs.pathFilter == 'true'
uses: chromaui/action@v1
with:
exitOnceUploaded: true
buildScriptName: 'build:storybook'
projectToken: ${{ secrets[matrix.projectToken] }}
workingDir: ${{ matrix.path }}
autoAcceptChanges: 'main'
onlyChanged: true # Required option to enable TurboSnap