-
Notifications
You must be signed in to change notification settings - Fork 375
/
Copy pathconfig.yml
792 lines (733 loc) · 25.5 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# adapted from https://github.com/CircleCI-Public/circleci-demo-react-native
# and https://github.com/facebook/react-native/blob/master/.circleci/config.yml
version: 2
reference:
workspace: &workspace ~/src
## Configurations
android_config: &android_config
working_directory: *workspace
macos:
xcode: "10.2.1"
shell: /bin/bash --login -eo pipefail
environment:
TERM: dumb
_JAVA_OPTIONS: "-Xmx7g -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxPermSize=3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"'
defaults: &defaults
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
environment:
# To avoid ENOMEM problem when running node
NODE_OPTIONS: "--max-old-space-size=4096"
android-defaults: &android-defaults
<<: *defaults
docker:
- image: circleci/android:api-28-node
environment:
_JAVA_OPTIONS: "-Xmx7g -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxPermSize=3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"'
e2e-defaults: &e2e-defaults
<<: *defaults
docker:
- image: celohq/circleci
general:
artifacts:
- "mobile/coverage"
- "protocol/coverage"
jobs:
install_dependencies:
<<: *defaults
steps:
- restore_cache:
keys:
- source-v1-{{ .Branch }}-{{ .Revision }}
- source-v1-{{ .Branch }}-
- source-v1-
- checkout
- save_cache:
key: source-v1-{{ .Branch }}-{{ .Revision }}
paths:
- ".git"
- run:
name: Verify setup for incremental testing
command: |
set -euo pipefail
cd ~/app
set -v
# To get the "master" branch mapping
git checkout master
git checkout ${CIRCLE_BRANCH}
# Verify that following commands work, they are later called in the incremental testing script
# There output does not matter here, the fact that they finish successfully does.
git rev-parse --abbrev-ref HEAD
- attach_workspace:
at: ~/app
- restore_cache:
keys:
- yarn-v2-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-v2-{{ arch }}-{{ .Branch }}-
- yarn-v2-{{ arch }}-
- yarn-v2-
- run:
name: Delete @celo dir from node_modules (if its there)
command: rm -rf ~/app/node_modules/@celo
- run:
name: Install dependencies
command: |
# Deals with yarn install flakiness which can come due to yarnpkg.com being
# unreliable. For example, https://circleci.com/gh/celo-org/celo-monorepo/82685
yarn install || yarn install
- run:
name: Fail if someone forgot to commit "yarn.lock"
command: |
if [[ $(git status --porcelain) ]]; then
echo "There are git differences after running yarn install"
exit 1
fi
- run: npm rebuild scrypt
- save_cache:
key: yarn-v2-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- packages/*/node_modules
- run:
name: Build packages
command: |
# separate build to avoid ENOMEM in CI :(
yarn build --scope @celo/utils
yarn build --scope @celo/protocol
yarn build --scope docs
yarn build --scope @celo/walletkit
yarn build --ignore @celo/protocol --ignore docs --ignore @celo/walletkit
- run:
name: Check licenses
command: yarn check-licenses
- persist_to_workspace:
root: .
paths:
- .
end-to-end-mobile-test:
<<: *android_config
resource_class: large
steps:
- checkout
- run: cd ~/src/
- restore_cache:
keys:
- yarn-v4-macos-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-v4-macos-{{ .Branch }}-
- yarn-v4-macos-
- yarn-v4-
- restore_cache:
keys:
- android-emulator-image-v3-{{ checksum "packages/mobile/scripts/install_android_emulator_image.sh" }}
- run:
name: Setup environment variables
command: |
echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin:/usr/local/share/android-sdk/tools/bin"' >> $BASH_ENV
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
echo 'export ANDROID_SDK_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
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/
- run:
name: Install Android sdk
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk
- run:
name: Install emulator dependencies
command: (yes | bash ./packages/mobile/scripts/install_android_emulator_image.sh > /dev/null) || true
- save_cache:
key: android-emulator-image-v3-{{ checksum "packages/mobile/scripts/install_android_emulator_image.sh" }}
paths:
- /usr/local/Caskroom/android-sdk/*
- run:
name: Install Android dependencies
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install cask
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:
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"
# Copy device configuarion, adv for some reason doesn't
mkdir -p ~/.android/avd/Nexus_5X_API_28_x86.avd/ && cp packages/mobile/e2e/conf/avd_conf.ini ~/.android/avd/Nexus_5X_API_28_x86.avd/config.ini
- run:
name: Set up nodejs
command: |
echo `. ~/.bash_profile` # for some mreason just `source ~/.bash_profile` makes the build fail
# install nvm
HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
echo -e '\nexport NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile
echo -e '\n[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bash_profile # add nvm to path
- run: echo `. ~/.bash_profile`
- run: nvm install v10.16.3 && nvm use v10.16.3
- run:
name: install miscellaneous
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install tree
# Currently not used
# - run: npm install --global react-native-kill-packager
- run:
# need to run this because it's another OS than install_dependencies job
name: yarn
command: |
# TODO, Make cache work and figure out why this doesn't work
# if [ ! -d node_modules ]; then
# echo "No cache found, install yarn. Hold tight."
# yarn
# else
# echo "Cache found, just run post-script."
# yarn postinstall
# fi
yarn
yarn build
yarn run jetify
- save_cache:
key: yarn-v4-macos-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/src/node_modules
- ~/src/packages/*/node_modules
- ~/.cache/yarn
- run:
name: Install some extra dependencies the app needs
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:
name: Start emulator
command: cd ~/src/packages/mobile && bash ./scripts/start_emulator.sh
background: true
- 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:
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
# TODO - run: unlock device
- run:
name: Run yarn dev
command: cd ~/src/packages/mobile && ENVFILE=".env.test" yarn dev
- run:
name: Run test itself
command: cd ~/src/packages/mobile && ENVFILE=".env.test" yarn test:detox
- run: cd ~/src
- save_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" }}
paths:
- ~/src/packages/mobile/android/app/build/outputs/apk/
- ~/.gradle/
lint-checks:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
# 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
general-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: jest tests
command: |
mkdir -p test-results/jest
yarn run lerna --ignore @celo/contractkit --ignore @celo/mobile --ignore @celo/protocol --ignore @celo/celotool --ignore @celo/walletkit --ignore @celo/celocli run test
mobile-test-build-app:
<<: *android-defaults
resource_class: large
steps:
- attach_workspace:
at: ~/app
- run:
name: Build Android app (debug version)
command: |
set -euo pipefail
yarn run jetify
cd packages/mobile/android
ENVFILE=.env.test ./gradlew assembleDebug
cd -
mobile-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Ensure translations are not missing
command: |
cd packages/mobile
yarn --cwd packages/mobile test:verify-locales
- run:
name: jest tests
command: |
mkdir -p test-results/jest
# Tests fail with https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory without this
NODE_OPTIONS="--max-old-space-size=4096" yarn --cwd packages/mobile test:ci
environment:
JEST_JUNIT_OUTPUT: test-results/jest/junit.xml
- store_test_results:
path: test-results
- store_artifacts:
path: packages/mobile/coverage
destination: mobile/coverage
- run:
name: copy
command: |
mkdir -p packages/mobile/mobile/coverage
cp -r packages/mobile/coverage packages/mobile/mobile/
- run:
name: Upload to CodeCov
command: yarn codecov -F mobile
verification-pool-api:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: jest tests
command: |
mkdir -p test-results/jest
yarn --cwd packages/verification-pool-api test
environment:
JEST_JUNIT_OUTPUT: test-results/jest/junit.xml
protocol-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
FILES_TO_CHECK="${PWD}/packages/protocol,${PWD}/packages/utils,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: test
# Flaky tests - run them twice
command: yarn --cwd packages/protocol test || yarn --cwd packages/protocol test
# Slow and flaky compared to protocol-test which runs without coverage
protocol-test-with-code-coverage:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
FILES_TO_CHECK="${PWD}/packages/protocol,${PWD}/packages/utils,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: test
# Flaky tests - run them twice
command: yarn --cwd packages/protocol test:coverage || yarn --cwd packages/protocol test:coverage
- store_artifacts:
path: packages/protocol/coverage
destination: protocol/coverage
- run:
name: Upload to CodeCov
command: yarn codecov -F protocol
contractkit-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Generate DevChain
command: |
(cd packages/contractkit && yarn test:prepare)
- run:
name: Run Tests
command: yarn --cwd=packages/contractkit test
- run:
name: Install and test the npm package
command: |
set -euo pipefail
cd packages/contractkit
yarn pack
cd /tmp
npm install ~/app/packages/contractkit/*.tgz
walletkit-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: test alphanet
command: |
# Test alphanet
set -euo pipefail
yarn --cwd=packages/walletkit build alfajores
yarn --cwd=packages/walletkit test
- run:
name: test alphanet staging
command: |
# Test alphanet
set -euo pipefail
yarn --cwd=packages/walletkit build alfajoresstaging
yarn --cwd=packages/walletkit test
- run:
name: Install and test the npm package
command: |
set -euo pipefail
cd packages/walletkit
yarn pack
cd /tmp
npm install ~/app/packages/walletkit/*.tgz
cli-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Test
command: |
set -euo pipefail
yarn --cwd=packages/cli test
- run:
name: Fail if someone forgot to commit CLI docs
command: |
yarn --cwd=packages/cli docs
if [[ $(git status packages/docs/command-line-interface --porcelain) ]]; then
git --no-pager diff packages/docs/command-line-interface
echo "There are git differences after generating CLI docs"
exit 1
fi
- run:
name: Verify that a new account can be created
command: |
yarn --cwd=packages/cli run celocli account:new
- run:
name: Install and test the npm package
command: |
set -euo pipefail
cd packages/cli
yarn pack
cd /tmp
npm install ~/app/packages/cli/celo-celocli-*.tgz
./node_modules/.bin/celocli account:new # Small test
typescript-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Install and test the npm package
command: |
set -euo pipefail
cd packages/typescript
yarn pack
cd /tmp
npm install ~/app/packages/typescript/*.tgz
utils-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Install and test the npm package
command: |
set -euo pipefail
cd packages/utils
yarn pack
cd /tmp
npm install ~/app/packages/utils/*.tgz
end-to-end-geth-transfer-test:
<<: *e2e-defaults
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
no_output_timeout: 20m
command: |
set -e
cd packages/celotool
./ci_test_transfers.sh checkout master
end-to-end-geth-exit-test:
<<: *e2e-defaults
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
no_output_timeout: 20m
command: |
set -e
cd packages/celotool
./ci_test_exit.sh checkout master
end-to-end-geth-governance-test:
<<: *e2e-defaults
# Source: https://circleci.com/docs/2.0/configuration-reference/#resource_class
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
no_output_timeout: 20m
command: |
set -e
cd packages/celotool
./ci_test_governance.sh checkout master
end-to-end-geth-sync-test:
<<: *e2e-defaults
# Source: https://circleci.com/docs/2.0/configuration-reference/#resource_class
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
cd packages/celotool
./ci_test_sync.sh checkout master
end-to-end-geth-integration-sync-test:
<<: *e2e-defaults
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
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
cd packages/celotool
./ci_test_attestations.sh checkout master
end-to-end-geth-validator-order-test:
<<: *e2e-defaults
resource_class: large
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
cd packages/celotool
./ci_test_validator_order.sh checkout master
web:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- attach_workspace:
at: ~/app
- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: cd packages/web && ./circle_deploy.sh
test-typescript-npm-package-install:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- run:
name: Installing npm package - @celo/typescript
command: yarn add @celo/typescript
test-utils-npm-package-install:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- run:
name: Installing npm package - @celo/utils
command: yarn add @celo/utils
test-contractkit-npm-package-install:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- run:
name: Installing npm package - @celo/contractkit
command: |
# Try one more time in case the first attempt fails
# to deal with scenarios like https://circleci.com/gh/celo-org/celo-monorepo/23329
yarn add @celo/contractkit || yarn add @celo/contractkit
test-walletkit-npm-package-install:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- run:
name: Installing npm package - @celo/walletkit
command: |
# Try one more time in case the first attempt fails
# to deal with scenarios like https://circleci.com/gh/celo-org/celo-monorepo/23329
yarn add @celo/walletkit || yarn add @celo/walletkit
test-celocli-npm-package-install:
working_directory: ~/app
docker:
- image: celohq/node10-gcloud
steps:
- run:
name: Installing npm package - @celo/celocli
command: npm install @celo/celocli
- run:
name: Minor test of celocli
command: ./node_modules/.bin/celocli account:new # Small test
workflows:
version: 2
celo-monorepo-build:
jobs:
- install_dependencies
- end-to-end-mobile-test:
requires:
- install_dependencies
- mobile-test-build-app
- lint-checks:
requires:
- install_dependencies
- general-test:
requires:
- install_dependencies
- walletkit-test:
requires:
- install_dependencies
- cli-test:
requires:
- install_dependencies
- contractkit-test:
requires:
- install_dependencies
- mobile-test:
requires:
- lint-checks
- mobile-test-build-app:
requires:
- mobile-test
- verification-pool-api:
requires:
- lint-checks
- protocol-test:
requires:
- lint-checks
- walletkit-test
- typescript-test:
requires:
- install_dependencies
- utils-test:
requires:
- install_dependencies
- end-to-end-geth-transfer-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-exit-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-governance-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-sync-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-integration-sync-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-attestations-test:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-validator-order-test:
requires:
- lint-checks
- contractkit-test
npm-install-testing-cron-workflow:
triggers:
- schedule:
# 7 PM in UTC = noon in PDT.
# Best for test to fail during SF afternoon, so that, someone can fix it during the day time.
cron: "0 19 * * *"
filters:
branches:
only:
- master
jobs:
- test-typescript-npm-package-install
- test-utils-npm-package-install
- test-walletkit-npm-package-install
- test-contractkit-npm-package-install
- test-celocli-npm-package-install
protocol-testing-with-code-coverage-cron-workflow:
triggers:
- schedule:
# 1 PM in UTC = 6 AM in PDT.
# Best for this slow test (~3 hours) to run during SF early morning.
cron: "0 13 * * *"
filters:
branches:
only:
- master
jobs:
- install_dependencies
- lint-checks:
requires:
- install_dependencies
- walletkit-test:
requires:
- install_dependencies
- protocol-test-with-code-coverage:
requires:
- lint-checks
- walletkit-test