Skip to content

Commit

Permalink
Ensure we update visual snapshot on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jan 30, 2025
1 parent 12c88f9 commit 9106a96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/icons-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
run: yarn workspace dnb-design-system-portal build:visual-test

- name: Run visual tests
run: yarn workspace dnb-design-system-portal test:screenshots:ci
run: yarn workspace dnb-design-system-portal test:screenshots:ci:update

- name: Commit updated snapshots
run: yarn workspace @dnb/eufemia postbuild:commit
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
timeout-minutes: 40

steps:
- name: Check branch and exit early
if: startsWith(github.ref, 'refs/heads/icon')
run: echo "Skipping this run on icon* branches" && exit 0

- name: Git checkout
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"test:postbuild": "yarn jest ./postbuild.test.ts --ci --testPathIgnorePatterns=[]",
"test:screenshots": "yarn jest --config=./jest.config.screenshots.js --maxWorkers=1 --detectOpenHandles --testPathPattern ",
"test:screenshots:ci": "yarn jest --config=./jest.config.screenshots.js --ci --bail --maxWorkers=1",
"test:screenshots:ci:update": "yarn test:screenshots:ci --maxWorkers=1 --updateSnapshot",
"test:screenshots:ci:update": "yarn test:screenshots:ci --updateSnapshot",
"test:screenshots:reset": "find . -name '*.snap.png' -type f|xargs rm -f && yarn test:screenshots",
"test:screenshots:update": "yarn jest --config=./jest.config.screenshots.js --maxWorkers=1 --updateSnapshot --testPathPattern ",
"test:screenshots:watch": "JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE=1 jest --config=./jest.config.screenshots.js --watchAll --detectOpenHandles --testPathPattern ",
Expand Down

0 comments on commit 9106a96

Please sign in to comment.