Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
ci: added option to update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
enell committed Feb 12, 2024
1 parent a2acec2 commit e7a046c
Showing 1 changed file with 63 additions and 31 deletions.
94 changes: 63 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,35 @@ commands:
- add_ssh_keys:
fingerprints:
- "d3:8b:35:a0:d4:6c:eb:76:68:1d:c1:48:27:7b:81:37"
run_playwright:
parameters:
command:
type: enum
enum:
- rendering
- integration
update-snapshots:
type: boolean
default: false
steps:
- use_workspace
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Install Playwright
command: |
npx playwright install
- run:
name: Install Fonts
command: ./.circleci/install-fonts.sh
- run: pnpm run test:<<parameters.command>>
- store_test_results:
path: ./test/<<parameters.command>>/reports/xml/report.xml
- store_artifacts:
path: ./test/<<parameters.command>>/suites
- store_artifacts:
path: ./test/<<parameters.command>>/reports/html

jobs:
install:
executor: docker-node
Expand Down Expand Up @@ -104,41 +133,28 @@ jobs:
test-rendering:
executor: browser-node
steps:
- use_workspace
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Install Playwright
command: |
npx playwright install
- run:
name: Install Fonts
command: ./.circleci/install-fonts.sh
- run: pnpm run test:rendering
- store_test_results:
path: ./test/rendering/reports/xml/report.xml
- store_artifacts:
path: ./test/rendering/suites
- store_artifacts:
path: ./test/rendering/reports/html
- run_playwright:
command: rendering

test-integration:
executor: browser-node
steps:
- use_workspace
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Install Playwright
command: |
npx playwright install
- run: pnpm run test:integration
- store_test_results:
path: ./test/integration/reports/xml/report.xml
- store_artifacts:
path: ./test/integration/suites
- store_artifacts:
path: ./test/integration/reports/html
- run_playwright:
command: integration

test-rendering-update-snapshots:
executor: browser-node
steps:
- run_playwright:
command: rendering
update-snapshots: true

test-integration-update-snapshots:
executor: browser-node
steps:
- run_playwright:
command: integration
update-snapshots: true

publish-dev:
executor: docker-node
Expand Down Expand Up @@ -307,6 +323,22 @@ workflows:
requires:
- verify-specs

update-snapshots:
jobs:
- install:
filters:
branches:
ignore: /.*/
- build:
requires:
- install
- test-rendering-update-snapshots:
requires:
- build
- test-integration-update-snapshots:
requires:
- build

trigger_release:
jobs:
- install_build_auto:
Expand Down

0 comments on commit e7a046c

Please sign in to comment.