Skip to content

Commit

Permalink
ci: minor improvements (#6895)
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemiev committed Oct 1, 2020
1 parent 880e1da commit 16aaa05
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .circleci/config.yml
@@ -1,7 +1,5 @@
# Javascript Node CircleCI 2.1 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1

executors:
Expand All @@ -19,7 +17,7 @@ executors:

macos-executor:
macos:
xcode: 11.4.1
xcode: 11.5.0

test_env_vars: &test_env_vars
environment:
Expand All @@ -29,20 +27,6 @@ test_env_vars: &test_env_vars
NPM_EMAIL: circleci@amplify.js

commands:
restore_pods:
steps:
- restore_cache:
keys:
- v1-storage-app-pods-{{ checksum "ios/Podfile.lock" }}
- v1-storage-app-pods-

save_pods:
steps:
- save_cache:
key: v1-storage-app-pods-{{ checksum "ios/Podfile.lock" }}
paths:
- ios/Pods

publish_to_verdaccio:
steps:
- run:
Expand Down Expand Up @@ -138,13 +122,11 @@ commands:
command: |
echo "Current NPM registry: " $(yarn config get registry)
~/amplify-js/.circleci/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
- restore_pods
- run:
name: Install CocoaPods
command: |
cd ios
pod install
- save_pods
- run:
background: true
command: xcrun simctl boot "iPhone 11" || true
Expand Down Expand Up @@ -279,10 +261,22 @@ jobs:
executor: build-executor
steps:
- checkout
- run: yarn config set workspaces-experimental true
- run: yarn --frozen-lockfile
- run: yarn run bootstrap
- run: yarn run build
- run:
name: yarn install --non-interactive
# temporarily rename .yarnrc before installing so that we can generate a yarn.lock artifact
command: |
mv .yarnrc ._yarnrc
yarn
- run: yarn build
# storing yarn.lock as an artifact, so that we can quickly get a dependency diff
# with the last working build in the event that some upstream deps break the build in the future
- store_artifacts:
path: yarn.lock
- run:
name: delete lockfile after persisting
command: |
mv ._yarnrc .yarnrc
rm yarn.lock
- save_cache:
key: amplify-ssh-deps-{{ .Branch }}
paths:
Expand All @@ -300,8 +294,8 @@ jobs:
- run:
name: 'Run Amplify JS unit tests'
command: |
yarn run test
yarn run coverage
yarn test
yarn coverage
integ_setup:
executor: build-executor
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,3 +16,4 @@ packages/**/cjs/
*.log
.npm/
packages/**/cypress/videos/
yarn.lock

0 comments on commit 16aaa05

Please sign in to comment.