-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(circleci): caching again (#3771)
- Loading branch information
1 parent
3555ff5
commit 1202142
Showing
10 changed files
with
142 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,148 @@ | ||
aliases: | ||
- &yarn | ||
name: Installing dependencies | ||
command: yarn install --non-interactive --frozen-lockfile --cache-folder ~/.cache/yarn | ||
version: 2.1 | ||
|
||
- &clean | ||
name: Cleaning | ||
command: yarn cache clean | ||
|
||
- &i18n | ||
name: Building locales | ||
command: yarn build:i18n | ||
executors: | ||
default: | ||
docker: | ||
- image: cimg/node:18.18 | ||
user: root | ||
resource_class: large | ||
working_directory: ~/buie | ||
cypress-executor: | ||
docker: | ||
- image: cypress/included:13.13.0 | ||
user: root | ||
resource_class: large | ||
working_directory: ~/buie | ||
|
||
- &build | ||
name: Building project | ||
command: yarn build:prod:npm | ||
commands: | ||
yarn-install: | ||
steps: | ||
- run: | ||
name: Installing dependencies | ||
command: yarn install --non-interactive --frozen-lockfile --cache-folder /node_modules | ||
|
||
- &restore-yarn-cache | ||
keys: | ||
- yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
- yarn-cache-{{ .Branch }}- | ||
build-locales: | ||
steps: | ||
- run: | ||
name: Building locales | ||
command: yarn --cwd /buie build:i18n | ||
|
||
- &save-yarn-cache | ||
paths: | ||
- ~/.cache/yarn | ||
- node_modules | ||
key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
build-project: | ||
steps: | ||
- run: | ||
name: Building project | ||
command: yarn --cwd /buie build:prod:npm | ||
|
||
- &prepare-cache | ||
name: Prepare Yarn Cache | ||
command: | | ||
mkdir -p ~/.cache/yarn | ||
chown -R $(whoami) ~/.cache/yarn | ||
restore-yarn-cache: | ||
steps: | ||
- restore_cache: | ||
keys: | ||
- yarn-cache-v5-{{ checksum "yarn.lock" }} | ||
|
||
defaults: &defaults | ||
resource_class: large | ||
working_directory: ~/buie | ||
docker: | ||
- image: cimg/node:18.18 | ||
save-yarn-cache: | ||
steps: | ||
- save_cache: | ||
key: yarn-cache-v5-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ./node_modules | ||
|
||
version: 2 | ||
setup-workspace: | ||
steps: | ||
- attach_workspace: | ||
at: /buie | ||
|
||
jobs: | ||
setup: | ||
executor: default | ||
steps: | ||
- checkout | ||
- restore-yarn-cache | ||
- yarn-install | ||
- save-yarn-cache | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- . | ||
|
||
lint: | ||
<<: *defaults | ||
executor: default | ||
steps: | ||
- checkout | ||
- run: *prepare-cache | ||
- restore-cache: *restore-yarn-cache | ||
- run: *yarn | ||
- save-cache: *save-yarn-cache | ||
- run: *clean | ||
- run: *i18n | ||
- setup-workspace | ||
- build-locales | ||
- run: | ||
name: Commit lint | ||
command: ./scripts/commitlint.sh | ||
command: /buie/scripts/commitlint.sh | ||
- run: | ||
name: Code lint | ||
command: yarn lint | ||
command: yarn --cwd /buie lint | ||
|
||
flow: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *prepare-cache | ||
- restore-cache: *restore-yarn-cache | ||
- run: *yarn | ||
- save-cache: *save-yarn-cache | ||
- run: *clean | ||
- run: | ||
name: Flow | ||
command: yarn flow check | ||
executor: default | ||
steps: | ||
- checkout | ||
- setup-workspace | ||
- run: | ||
name: Flow | ||
command: yarn --cwd /buie flow check | ||
|
||
build-unit-tests: | ||
<<: *defaults | ||
executor: default | ||
steps: | ||
- checkout | ||
- run: *prepare-cache | ||
- restore-cache: *restore-yarn-cache | ||
- run: *yarn | ||
- save-cache: *save-yarn-cache | ||
- run: *clean | ||
- run: *i18n | ||
- setup-workspace | ||
- build-locales | ||
- run: | ||
name: Babel build | ||
command: yarn build:ci:es | ||
command: yarn --cwd /buie build:ci:es | ||
- run: | ||
name: Checking locales and styles | ||
command: ./scripts/check_generated_files.sh | ||
command: /buie/scripts/check_generated_files.sh | ||
- run: | ||
name: Webpack build | ||
command: yarn build:ci:dist | ||
command: yarn --cwd /buie build:ci:dist | ||
- run: echo 'export TZ=America/Los_Angeles' >> $BASH_ENV | ||
- run: | ||
name: Unit tests | ||
command: yarn test --maxWorkers=3 | ||
command: yarn --cwd /buie test --maxWorkers=3 | ||
|
||
e2e-tests: | ||
<<: *defaults | ||
docker: | ||
- image: cypress/included:13.13.0 | ||
steps: | ||
- checkout | ||
- run: *prepare-cache | ||
- restore-cache: *restore-yarn-cache | ||
- run: *yarn | ||
- save-cache: *save-yarn-cache | ||
- run: | ||
name: E2E tests | ||
command: yarn test:e2e | ||
executor: cypress-executor | ||
steps: | ||
- checkout | ||
- setup-workspace | ||
- run: | ||
name: Cypress run | ||
command: yarn --cwd /buie test:e2e | ||
|
||
chromatic-deploy: | ||
<<: *defaults | ||
executor: default | ||
steps: | ||
- checkout | ||
- run: *prepare-cache | ||
- restore-cache: *restore-yarn-cache | ||
- run: *yarn | ||
- save-cache: *save-yarn-cache | ||
- run: *clean | ||
- run: *i18n | ||
- run: *build | ||
- run: | ||
name: Chromatic | ||
command: yarn chromatic | ||
- checkout | ||
- setup-workspace | ||
- build-locales | ||
- build-project | ||
- run: | ||
name: Chromatic | ||
command: yarn --cwd /buie chromatic | ||
|
||
workflows: | ||
version: 2 | ||
lint_test_build: | ||
jobs: | ||
- lint | ||
- flow | ||
- build-unit-tests | ||
- e2e-tests | ||
- chromatic-deploy | ||
- setup | ||
- lint: | ||
requires: | ||
- setup | ||
- flow: | ||
requires: | ||
- setup | ||
- build-unit-tests: | ||
requires: | ||
- setup | ||
- e2e-tests: | ||
requires: | ||
- setup | ||
- chromatic-deploy: | ||
requires: | ||
- setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"autoAcceptChanges": "master", | ||
"buildScriptName": "build:prod:storybook", | ||
"onlyStoryFiles": ["./src/**/stories/tests/*.stories.@(js|jsx|ts|tsx)"], | ||
"onlyChanged": true, | ||
"skip": "mojito" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.