Skip to content

Commit

Permalink
chore: re-enable Percy (#1416)
Browse files Browse the repository at this point in the history
  • Loading branch information
astone123 authored Oct 19, 2023
1 parent bfecadd commit f7bb052
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ executors:
- image: "cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1"
resource_class: large
environment:
PERCY_TOKEN:
CYPRESS_coverage: false

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
Expand Down Expand Up @@ -102,6 +101,9 @@ commands:
isComponent:
type: boolean
default: false
recordPercy:
type: boolean
default: false
steps:
- attach_ws
- when:
Expand All @@ -125,9 +127,22 @@ commands:
- equal: [false, << parameters.isMobile >>]
- equal: [false, << parameters.isComponent >>]
steps:
- cypress/run-tests:
start-command: yarn start:ci
cypress-command: yarn cypress run --ci-build-id=<<parameters.ciBuildId>> --group="<<parameters.group>>" --record --parallel --spec=<<parameters.specPattern>> --browser=<<parameters.browser>>
- when:
condition:
and:
- equal: [true, <<parameters.recordPercy>>]
steps:
- cypress/run-tests:
start-command: yarn start:ci
cypress-command: yarn percy exec -- yarn cypress run --ci-build-id=<<parameters.ciBuildId>> --group="<<parameters.group>>" --record --parallel --spec=<<parameters.specPattern>> --browser=<<parameters.browser>>
- when:
condition:
and:
- equal: [false, <<parameters.recordPercy>>]
steps:
- cypress/run-tests:
start-command: yarn start:ci
cypress-command: yarn cypress run --ci-build-id=<<parameters.ciBuildId>> --group="<<parameters.group>>" --record --parallel --spec=<<parameters.specPattern>> --browser=<<parameters.browser>>
- report-coverage

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jobs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
Expand Down Expand Up @@ -169,6 +184,9 @@ jobs:
isComponent:
type: boolean
default: false
recordPercy:
type: boolean
default: false
steps:
- setup_linux
- cypress_tests:
Expand All @@ -178,6 +196,7 @@ jobs:
group: <<parameters.group>>
isMobile: <<parameters.isMobile>>
isComponent: <<parameters.isComponent>>
recordPercy: <<parameters.recordPercy>>
cypress_tests_windows:
executor:
# executor comes from the "windows" orb
Expand Down Expand Up @@ -239,6 +258,7 @@ linux-workflow: &linux-workflow
specPattern: "cypress/tests/ui/*"
ciBuildId: ${CIRCLE_SHA1:0:8}
group: "UI - Chrome"
recordPercy: true
requires:
- Setup Linux
# Run E2E tests in Chrome with mobile device viewport
Expand Down

0 comments on commit f7bb052

Please sign in to comment.