Skip to content

Commit

Permalink
Merge pull request #11002 from bbc/change-order-storybook-permalink
Browse files Browse the repository at this point in the history
Don't publish storybook permalink unless Chromatic tests have passed
  • Loading branch information
karinathomasbbc authored Aug 15, 2023
2 parents 4322e98 + 9bea516 commit 343641a
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/simorgh-misc-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,28 @@ jobs:
- name: Install Node Modules
if: steps.cache.outputs.cache-hit != 'true'
run: ./scripts/installNodeModules.sh

- name: Chromatic UI Tests
uses: chromaui/action@v1
if: github.ref != 'refs/heads/latest' && github.event.pull_request.head.repo.full_name == 'bbc/simorgh' # Only run when not on latest or not a fork.
with:
token: ${{ secrets.SIMORGH_DEV_STORYBOOK_RELEASE }}
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
buildScriptName: 'build:storybook'
exitOnceUploaded: true
onlyChanged: true

- name: Chromatic UI Tests - Latest
uses: chromaui/action@v1
if: github.ref == 'refs/heads/latest' # Only run on latest branch
with:
token: ${{ secrets.SIMORGH_DEV_STORYBOOK_RELEASE }}
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
buildScriptName: 'build:storybook'
exitOnceUploaded: true
onlyChanged: true
autoAcceptChanges: true # Auto accept changes to accept a new baseline when merging to latest

- name: Get Storybook Branch Permalink
uses: actions/github-script@v6
id: get-storybook-permalink
Expand All @@ -67,27 +88,6 @@ jobs:
}' \
--fail
- name: Chromatic UI Tests
uses: chromaui/action@v1
if: github.ref != 'refs/heads/latest' && github.event.pull_request.head.repo.full_name == 'bbc/simorgh' # Only run when not on latest or not a fork.
with:
token: ${{ secrets.SIMORGH_DEV_STORYBOOK_RELEASE }}
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
buildScriptName: 'build:storybook'
exitOnceUploaded: true
onlyChanged: true

- name: Chromatic UI Tests - Latest
uses: chromaui/action@v1
if: github.ref == 'refs/heads/latest' # Only run on latest branch
with:
token: ${{ secrets.SIMORGH_DEV_STORYBOOK_RELEASE }}
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
buildScriptName: 'build:storybook'
exitOnceUploaded: true
onlyChanged: true
autoAcceptChanges: true # Auto accept changes to accept a new baseline when merging to latest

- name: Duplicate Dependency Checker
run: yarn test:dependencies

Expand Down

0 comments on commit 343641a

Please sign in to comment.