[Darkside] Warning triangle icon in error messages #6045
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Visual Regression Tests | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "@navikt/**" | |
pull_request: | |
branches: [main, next] | |
paths: | |
- "@navikt/**" | |
- "aksel.nav.no/website/pages/templates/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
chromatic: | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-chromatic') }} | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: set-env for yarn install to @navikt scope | |
shell: bash | |
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: yarn | |
- name: Build packages | |
run: yarn boot | |
- name: Chromatic | |
uses: chromaui/action@latest | |
id: chromatic_tests | |
continue-on-error: true | |
with: | |
autoAcceptChanges: "main" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
exitZeroOnChanges: false | |
buildScriptName: "build:storybook-chromatic" | |
onlyChanged: true | |
untraced: "**/package.json|yarn.lock|**/*.md" | |
externals: "**/core/css/*.css|**/core/css/baseline/*.css|**/core/css/form/*.css|**/core/css/primitives/*.css" | |
traceChanged: true | |
env: | |
STORYBOOK_GITHUB_SHA: ${{ github.sha }} | |
- name: Get commit sha | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'" | |
id: vars | |
shell: bash | |
run: | | |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Find Comment | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'" | |
uses: peter-evans/find-comment@v2 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: "github-actions[bot]" | |
body-includes: Storybook demo | |
- name: Create or update comment | |
if: steps.chromatic_tests.outcome == 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push' | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
## [Storybook demo](${{steps.chromatic_tests.outputs.storybookUrl}}) | |
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} komponenter | ${{steps.chromatic_tests.outputs.specCount}} stories | |
edit-mode: replace | |
- name: Create or update failed comment | |
if: steps.chromatic_tests.outcome != 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push' | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
## [Storybook demo](${{steps.chromatic_tests.outputs.storybookUrl}}) / [Chromatic](${{steps.chromatic_tests.outputs.url}}) | |
### 📝 Endringer til review: ${{steps.chromatic_tests.outputs.changeCount}} | |
${{ steps.chromatic_tests.outputs.errorCount > 0 && format('### ❌ Stories med feil: {0}', steps.chromatic_tests.outputs.errorCount) || '' }} | |
${{ steps.chromatic_tests.outputs.interactionTestFailuresCount > 0 && format('### ❌ Feilede interaksjonstester: {0}', steps.chromatic_tests.outputs.interactionTestFailuresCount) || '' }} | |
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} komponenter | ${{steps.chromatic_tests.outputs.specCount}} stories | |
edit-mode: replace |