Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/about-below
Browse files Browse the repository at this point in the history
* master: (37 commits)
  [Wallet] Add support for social wallet (Safeguards) import  (#1414)
  [Wallet] Implement new backup flows including social backup (#1399)
  Use validator set precompiles in Attestations (#1248)
  E2E Attestations test + various e2e improvements (#1417)
  Update Footer (#1331)
  [Wallet] New camera permission flow (#1398)
  [Wallet] Enable push notifications on iOS (#1389)
  [Wallet] Add Celo Lite toggle (UI only, zeroSync on/off in other PR) (#1369)
  Document npm inter-repo dependencies instructions (#1370)
  [wallet]Add more documentation on ZeroSync mode (#1367)
  [wallet]Add documentation for jndcrash (#1364)
  Point end-to-end tests back to master (#1372)
  Alfajores changes & comment on unlocking accounts (#1297)
  Reconfigure terraform local configuration during init to allow multiple envs (#773)
  Implement proof-of-stake changes (#1177)
  [Celotool] Update blockchain-api deploy script to automatically update faucet address (#1347)
  Allow most recently reporting oracle to report again (#1288)
  [wallet]Add documentation for ZeroSync mode (#1361)
  Fix Metadata registration during contract deploy (#1346)
  [Wallet] Enable firebase on iOS (#1344)
  ...
  • Loading branch information
aaronmgdr committed Oct 22, 2019
2 parents d405449 + 3bf4177 commit f960f03
Show file tree
Hide file tree
Showing 267 changed files with 12,909 additions and 13,039 deletions.
177 changes: 54 additions & 123 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

version: 2
reference:
workspace: &workspace
~/src
workspace: &workspace ~/src
## Configurations
android_config: &android_config
working_directory: *workspace
Expand All @@ -15,7 +14,6 @@ reference:
TERM: dumb
JVM_OPTS: -Xmx3200m


defaults: &defaults
working_directory: ~/app
docker:
Expand All @@ -32,6 +30,11 @@ android-defaults: &android-defaults
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"'

e2e-defaults: &e2e-defaults
<<: *defaults
docker:
- image: celohq/circleci

general:
artifacts:
- "mobile/coverage"
Expand Down Expand Up @@ -117,7 +120,7 @@ jobs:
paths:
- .

mobile_e2e_test:
end-to-end-mobile-test:
<<: *android_config
resource_class: large
steps:
Expand All @@ -141,6 +144,7 @@ jobs:
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
export PATH=$PATH:/usr/local/share/android-sdk/platform-tools/
export GRADLE_OPTS='-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"'
- run:
name: Install Android sdk
command: |
Expand All @@ -160,7 +164,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-platform-tools
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask-versions
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install homebrew/cask-versions/adoptopenjdk8
- run:
- run:
name: Creace Android Virtual Device (AVD)
command: |
avdmanager create avd -n Nexus_5X_API_28_x86 -k "system-images;android-26;google_apis;x86" -g google_apis -d "Nexus 5"
Expand All @@ -181,7 +185,7 @@ jobs:
name: install miscellaneous
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install tree
# Currently not used
# - run: npm install --global react-native-kill-packager
# - run: npm install --global react-native-kill-packager
- run:
# need to run this because it's another OS than install_dependecies job
name: yarn
Expand All @@ -195,7 +199,7 @@ jobs:
# yarn postinstall
# fi
yarn
yarn build
yarn build
- save_cache:
key: yarn-v4-macos-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
Expand All @@ -207,18 +211,19 @@ jobs:
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pidcat watchman
- restore_cache:
key: yarn-v3-{{ arch }}-{{ .Branch }}-{{ checksum "packages/mobile/android/build.gradle" }}-{{ checksum "packages/mobile/android/settings.gradle" }}-{{ checksum "packages/mobile/android/app/build.gradle" }}-{{ checksum "packages/mobile/.env.test" }}
- run: cd ~/src/packages/mobile && yarn test:build-e2e # tests seem to fail if the app is built at the same time the emulator runs
- run:
name: Start emulator
command: cd ~/src/packages/mobile && bash ./scripts/start_emulator.sh
background: true
- run:
- run:
name: Start metro
command: cd ~/src/packages/mobile && yarn start
background: true
- run: cp node_modules/.bin/jest packages/mobile/node_modules/.bin/ # for some reason jest is just not there
# TODO - run: lock device
- run: tree packages/mobile/android/app/build/outputs/apk/
- run:
name: Build end-to-end test
command: cd ~/src/packages/mobile && yarn test:build-e2e
- run:
name: Sleep until Device connects
command: cd ~/src/packages/mobile && bash ./scripts/wait_for_emulator_to_connect.sh
Expand All @@ -235,13 +240,13 @@ jobs:
paths:
- ~/src/packages/mobile/android/app/build/outputs/apk/
- ~/.gradle/

lint-checks:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
# If this fails, fix it with
# If this fails, fix it with
# `./node_modules/.bin/prettier --config .prettierrc.js --write '**/*.+(ts|tsx|js|jsx)'`
- run: yarn run prettify:diff
- run: yarn run lint
Expand All @@ -267,6 +272,10 @@ jobs:
- attach_workspace:
at: ~/app

- run:
name: Set GRADLE_OPTS to speed up gradle
command: |
export GRADLE_OPTS='-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"'
- run:
name: Build Android app (debug version)
command: |
Expand Down Expand Up @@ -454,7 +463,7 @@ jobs:
steps:
- attach_workspace:
at: ~/app

- run:
name: Install and test the npm package
command: |
Expand All @@ -469,7 +478,7 @@ jobs:
steps:
- attach_workspace:
at: ~/app

- run:
name: Install and test the npm package
command: |
Expand All @@ -480,7 +489,7 @@ jobs:
npm install ~/app/packages/utils/*.tgz
end-to-end-geth-transfer-test:
<<: *defaults
<<: *e2e-defaults
steps:
- attach_workspace:
at: ~/app
Expand All @@ -489,37 +498,16 @@ jobs:
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Setup Go language
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
- run:
name: Setup Rust language
command: |
set -e
set -v
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
rustup install 1.36.0
rustup default 1.36.0
- run:
name: Run test
no_output_timeout: 20m
command: |
set -e
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_transfers.sh checkout master
end-to-end-geth-exit-test:
<<: *defaults
<<: *e2e-defaults
steps:
- attach_workspace:
at: ~/app
Expand All @@ -528,37 +516,16 @@ jobs:
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Setup Go language
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
- run:
name: Setup Rust language
command: |
set -e
set -v
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
rustup install 1.36.0
rustup default 1.36.0
- run:
name: Run test
no_output_timeout: 20m
command: |
set -e
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_exit.sh checkout master
end-to-end-geth-governance-test:
<<: *defaults
<<: *e2e-defaults
# Source: https://circleci.com/docs/2.0/configuration-reference/#resource_class
resource_class: medium+
steps:
Expand All @@ -569,37 +536,16 @@ jobs:
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Setup Go language
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
- run:
name: Setup Rust language
command: |
set -e
set -v
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
rustup install 1.36.0
rustup default 1.36.0
- run:
name: Run test
no_output_timeout: 20m
command: |
set -e
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_governance.sh checkout master
end-to-end-geth-sync-test:
<<: *defaults
<<: *e2e-defaults
# Source: https://circleci.com/docs/2.0/configuration-reference/#resource_class
resource_class: medium+
steps:
Expand All @@ -610,36 +556,15 @@ jobs:
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Setup Go language
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
- run:
name: Setup Rust language
command: |
set -e
set -v
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
rustup install 1.36.0
rustup default 1.36.0
- run:
name: Run test
command: |
set -e
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_sync.sh checkout master
end-to-end-geth-integration-sync-test:
<<: *defaults
<<: *e2e-defaults
steps:
- attach_workspace:
at: ~/app
Expand All @@ -649,27 +574,29 @@ jobs:
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Setup Go language
name: Run test
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
rustup install 1.36.0
rustup default 1.36.0
cd packages/celotool
./ci_test_sync_with_network.sh checkout master
end-to-end-geth-attestations-test:
<<: *e2e-defaults
resource_class: medium+
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Run test
command: |
set -e
export PATH=${PATH}:~/.cargo/bin:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_sync_with_network.sh checkout master
./ci_test_attestations.sh checkout master
web:
working_directory: ~/app
Expand Down Expand Up @@ -741,7 +668,7 @@ workflows:
celo-monorepo-build:
jobs:
- install_dependencies
- mobile_e2e_test:
- end-to-end-mobile-test:
requires:
- install_dependencies
- mobile-test-build-app
Expand Down Expand Up @@ -782,23 +709,27 @@ workflows:
- end-to-end-geth-transfer-test:
requires:
- lint-checks
- walletkit-test
- contractkit-test
- end-to-end-geth-exit-test:
requires:
- lint-checks
- walletkit-test
- contractkit-test
- end-to-end-geth-governance-test:
requires:
- lint-checks
- walletkit-test
- contractkit-test
- end-to-end-geth-sync-test:
requires:
- lint-checks
- walletkit-test
- contractkit-test
- end-to-end-geth-integration-sync-test:
requires:
- lint-checks
- walletkit-test
- contractkit-test
- end-to-end-geth-attestations-test:
requires:
- lint-checks
- contractkit-test
npm-install-testing-cron-workflow:
triggers:
- schedule:
Expand Down
Loading

0 comments on commit f960f03

Please sign in to comment.