Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(PPDSC-2607): checkout workspace before check #489

Merged
merged 3 commits into from
Nov 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,16 @@ commands:
- slack/notify:
<<: *slack_notify

run_test_visual_docs_percy:
description: 'Run the Percy tests for docs visual changes'
checkout_and_attach_workspace:
description: 'Checkout the code and project files'
steps:
- checkout
- attach_workspace:
at: ~/project

run_test_visual_docs_percy:
description: 'Run the Percy tests for docs visual changes'
steps:
- run:
name: Set percy/newskit-docsite token
command: echo "export PERCY_TOKEN=${PERCY_DOCSITE_TOKEN}" >> $BASH_ENV
Expand All @@ -331,9 +335,6 @@ commands:
run_test_visual_comps_percy:
description: 'Run the Percy tests for comps visual changes'
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Install Headless Chrome dependencies
command: make install_headless_chrome
Expand Down Expand Up @@ -661,12 +662,14 @@ jobs:
test_visual_comps_percy:
executor: node-large
steps:
- checkout_and_attach_workspace
- run_test_visual_comps_percy

conditionally_run_percy_comps_tests:
comps_tests_conditional_run_to_update_baselines:
# if there are any visual diffs we need to run the Percy comps tests to update the baselines
executor: node-large
steps:
- checkout_and_attach_workspace
- run:
name: 'Check if updates required'
command: |
Expand All @@ -679,11 +682,12 @@ jobs:
}
- run_test_visual_comps_percy

conditionally_run_percy_docsite_tests:
docsite_tests_conditional_run_to_update_baselines:
# if there are any visual diffs we need to run the Percy docsite tests to update the baselines
<<: *cypress_defaults
executor: cypress
steps:
- checkout_and_attach_workspace
- run:
name: 'Check if updates required'
command: |
Expand Down Expand Up @@ -750,12 +754,14 @@ jobs:
<<: *cypress_defaults
executor: cypress
steps:
- checkout_and_attach_workspace
- run_test_visual_docs_percy

test_visual_docs_percy_2:
<<: *cypress_defaults
executor: cypress
steps:
- checkout_and_attach_workspace
- run_test_visual_docs_percy

test_e2e_comps:
Expand Down Expand Up @@ -1566,11 +1572,11 @@ workflows:
- build_components

# Jobs for updating Percy baselines after PRs are merged
- conditionally_run_percy_comps_tests:
- comps_tests_conditional_run_to_update_baselines:
context: ncu-product-platforms-context
requires:
- download_headless_chrome
- conditionally_run_percy_docsite_tests:
- docsite_tests_conditional_run_to_update_baselines:
context: ncu-product-platforms-context
requires:
- build_docs_dev
Expand Down