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(circleci): update config #3527

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
21 changes: 15 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ aliases:

- &restore-yarn-cache
keys:
- yarn-{{ arch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-v1-{{ .Branch }}-

- &save-yarn-cache
paths:
- node_modules
- ~/.npm
- ~/.cache
key: yarn-{{ arch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- ~/.cache/yarn
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}

defaults: &defaults
resource_class: large
Expand All @@ -37,6 +36,9 @@ jobs:
- checkout
- restore-cache: *restore-yarn-cache
- run: *yarn
- run:
name: cache dir
command: yarn cache dir
- save-cache: *save-yarn-cache
- run: *clean
- run: *i18n
Expand Down Expand Up @@ -106,7 +108,14 @@ jobs:
- run: *i18n
- run:
name: Chromatic
command: yarn chromatic
command: |
if [ "{.Environment.CIRCLE_BRANCH}" = "master" ]; then
echo "{.Environment.CIRCLE_BRANCH} branch detected, auto-accepting changes"
yarn chromatic --auto-accept-changes
else
echo "Pull request detected, validating changes"
yarn chromatic
fi

workflows:
version: 2
Expand Down
Loading