Skip to content

Commit

Permalink
Add input variable for chromatic test (#63)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dvviktordelev authored Apr 24, 2024
1 parent 3a1a189 commit ba43f05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-node-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ on:
type: string
required: false
default: "ubuntu-22.04-large"
chromatic_enable:
description: 'Enable Chromatic Tests'
required: false
type: boolean
default: false
secrets:
DATAVISYN_BOT_REPO_TOKEN:
required: false
Expand All @@ -73,6 +78,8 @@ on:
required: false
CYPRESS_ENV:
required: false
CHROMATIC_PROJECT_TOKEN:
required: false

env:
NPM_REGISTRY: "https://registry.npmjs.org/"
Expand Down Expand Up @@ -105,6 +112,7 @@ jobs:
with:
ref: ${{ inputs.branch }}
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }}
- name: Checkout github-workflows
uses: actions/checkout@v3
with:
Expand All @@ -118,6 +126,11 @@ jobs:
npm_registry: ${{ env.NPM_REGISTRY }}
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
run_webpack: ${{ inputs.node_run_webpack }}
- name: Run Chromatic
if: ${{ inputs.chromatic_enable }}
uses: chromaui/[email protected]
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

build-python:
name: Python
Expand Down

0 comments on commit ba43f05

Please sign in to comment.