Skip to content

Commit ba43f05

Browse files
Add input variable for chromatic test (#63)
* add chromatic conditional and on push * fix if and token * added conditional fetch: 0 checkout step, needed for chromatic * action/checkout v3 ->> v4 * remove second checkout, make first fetch:0 * add conditional fetch-depth for chromatic * debug fetch-depth * debug fetch * fix condition * removed path check * remove chromatic from cypres and playwright * reverted checkout version to 3
1 parent 3a1a189 commit ba43f05

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/build-node-python.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ on:
6262
type: string
6363
required: false
6464
default: "ubuntu-22.04-large"
65+
chromatic_enable:
66+
description: 'Enable Chromatic Tests'
67+
required: false
68+
type: boolean
69+
default: false
6570
secrets:
6671
DATAVISYN_BOT_REPO_TOKEN:
6772
required: false
@@ -73,6 +78,8 @@ on:
7378
required: false
7479
CYPRESS_ENV:
7580
required: false
81+
CHROMATIC_PROJECT_TOKEN:
82+
required: false
7683

7784
env:
7885
NPM_REGISTRY: "https://registry.npmjs.org/"
@@ -105,6 +112,7 @@ jobs:
105112
with:
106113
ref: ${{ inputs.branch }}
107114
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
115+
fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }}
108116
- name: Checkout github-workflows
109117
uses: actions/checkout@v3
110118
with:
@@ -118,6 +126,11 @@ jobs:
118126
npm_registry: ${{ env.NPM_REGISTRY }}
119127
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
120128
run_webpack: ${{ inputs.node_run_webpack }}
129+
- name: Run Chromatic
130+
if: ${{ inputs.chromatic_enable }}
131+
uses: chromaui/[email protected]
132+
with:
133+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
121134

122135
build-python:
123136
name: Python

0 commit comments

Comments
 (0)