Skip to content

Commit

Permalink
reconfigure percy parallelism, finalize percy after running visual jo…
Browse files Browse the repository at this point in the history
…bs, remove separate desktop-gui-visual-tests job
  • Loading branch information
brian-mann committed Jun 29, 2020
1 parent fb8bf35 commit f2b0cea
Showing 1 changed file with 18 additions and 36 deletions.
54 changes: 18 additions & 36 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ jobs:
command: |
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec -- \
yarn cypress:run --record --parallel --group 2x-desktop-gui
working_directory: packages/desktop-gui
- verify-mocha-results
Expand All @@ -749,38 +752,6 @@ jobs:
path: /tmp/artifacts
- store-npm-logs

desktop-gui-visual-tests:
<<: *defaults
parallelism: 1
steps:
- attach_workspace:
at: ~/
- run:
command: yarn build-prod
working_directory: packages/desktop-gui
- run:
name: Desktop GUI server
command: yarn start
working_directory: packages/desktop-gui
background: true
- run:
# will use PERCY_TOKEN environment variable if available
# to tie Percy builds together, use environment variables
# https://docs.percy.io/docs/parallel-test-suites
# we can use workflow id and list number of jobs with Percy screenshots
# if we allow Percy snapshots in more jobs, use the same
# PERCY_* variables in all of them
command: |
CYPRESS_KONFIG_ENV=production \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID \
PERCY_PARALLEL_TOTAL=1 \
yarn percy exec -- \
yarn cypress:run --spec cypress/integration/settings_spec.js,cypress/integration/specs_list_spec.js
working_directory: packages/desktop-gui
- verify-mocha-results
# we don't really need any artifacts - we are only interested in visual screenshots
- store-npm-logs

desktop-gui-component-tests:
<<: *defaults
parallelism: 1
Expand All @@ -807,7 +778,7 @@ jobs:
command: |
CYPRESS_KONFIG_ENV=production \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID \
PERCY_PARALLEL_TOTAL=1 \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec -- \
yarn cypress:run --spec 'src/**/*_spec.jsx'
working_directory: packages/desktop-gui
Expand Down Expand Up @@ -866,6 +837,13 @@ jobs:
command: node index.js
working_directory: packages/launcher

finalize-percy:
<<: *defaults
steps:
- run:
name: "finalizes percy builds"
command: npx percy finalize --all

build-binary:
<<: *defaults
shell: /bin/bash --login
Expand Down Expand Up @@ -1582,9 +1560,6 @@ linux-workflow: &linux-workflow
- desktop-gui-integration-tests-2x:
requires:
- build
- desktop-gui-visual-tests:
requires:
- build
- desktop-gui-component-tests:
requires:
- build
Expand All @@ -1597,6 +1572,13 @@ linux-workflow: &linux-workflow
- run-launcher:
requires:
- build

- percy-finalize:
requires:
- desktop-gui-integration-tests-2x
- desktop-gui-component-tests
- cli-visual-tests

# various testing scenarios, like building full binary
# and testing it on a real project
- test-against-staging:
Expand Down

0 comments on commit f2b0cea

Please sign in to comment.