diff --git a/.github/workflows/simorgh-misc-checks.yml b/.github/workflows/simorgh-misc-checks.yml index 03c94cc18db..f90c198a6b8 100644 --- a/.github/workflows/simorgh-misc-checks.yml +++ b/.github/workflows/simorgh-misc-checks.yml @@ -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 @@ -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