@@ -46,7 +46,7 @@ commands:
46
46
command : |
47
47
mkdir -p ~/.tmp/checksumfiles
48
48
# Concatenate package.json so we can use them as a part of the cache key
49
- find . -maxdepth 3 -type f -name 'package.json' -not -path "*node_modules*" -print0 | sort -z | xargs -0 cat > ~/.tmp/checksumfiles/package.json
49
+ find . -maxdepth 5 -type f -name 'package.json' -not -path "*node_modules*" -print0 | sort -z | xargs -0 cat > ~/.tmp/checksumfiles/package.json
50
50
# Concatenate patches so we can use them as a part of the cache key
51
51
find ./patches -type f -name '*.patch' -print0 | sort -z | xargs -0 cat > ~/.tmp/checksumfiles/patches
52
52
- restore_cache :
@@ -154,6 +154,8 @@ jobs:
154
154
# separate build to avoid ENOMEM in CI :(
155
155
yarn build --scope @celo/base
156
156
yarn build --scope @celo/utils
157
+ yarn build --scope @celo/dev-utils
158
+ yarn build --scope @celo/connect
157
159
yarn build --scope @celo/protocol
158
160
yarn build --ignore @celo/protocol --ignore docs
159
161
@@ -403,7 +405,33 @@ jobs:
403
405
name : jest tests
404
406
command : |
405
407
mkdir -p test-results/jest
406
- yarn run lerna --ignore @celo/contractkit --ignore @celo/mobile --ignore @celo/protocol --ignore @celo/celotool --ignore @celo/celocli --ignore @celo/env-tests run test
408
+ yarn run lerna \
409
+ --ignore @celo/contractkit \
410
+ --ignore @celo/mobile \
411
+ --ignore @celo/protocol \
412
+ --ignore @celo/celotool \
413
+ --ignore @celo/celocli \
414
+ --ignore @celo/env-tests \
415
+ --ignore @celo/web \
416
+ --ignore @celo/identity \
417
+ --ignore @celo/transactions-uri \
418
+ --ignore '@celo/wallet-*' \
419
+ run test
420
+
421
+ - store_test_results :
422
+ path : test-results
423
+
424
+ web-test :
425
+ << : *defaults
426
+ steps :
427
+ - attach_workspace :
428
+ at : ~/app
429
+
430
+ - run :
431
+ name : jest tests
432
+ command : |
433
+ mkdir -p test-results/jest
434
+ yarn --cwd=packages/web run test
407
435
408
436
- store_test_results :
409
437
path : test-results
@@ -463,6 +491,45 @@ jobs:
463
491
name : Upload to CodeCov
464
492
command : yarn codecov -F mobile
465
493
494
+ wallets-test :
495
+ << : *defaults
496
+ steps :
497
+ - attach_workspace :
498
+ at : ~/app
499
+ - run :
500
+ name : Run Tests
501
+ command : yarn run lerna --scope '@celo/wallet-*' run test
502
+
503
+
504
+ # Split from the original script. The original script was assuming not big changes in dependencies.
505
+ # As that's a possibility, we require to install the old and re-install the new one, and circle
506
+ # crashes on the second re-install.
507
+ # This pre script, generates the build and devchain, and adds it to the workspace to be used for the
508
+ # other script
509
+ pre-protocol-test-release :
510
+ << : *defaults
511
+ resource_class : large
512
+ steps :
513
+ - attach_workspace :
514
+ at : ~/app
515
+ - run :
516
+ name : Check if the test should run
517
+ command : |
518
+ ./scripts/ci_check_if_test_should_run_v2.sh @celo/protocol
519
+ - run :
520
+ name : Generate devchain of previous release
521
+ command : |
522
+ mkdir -p ~/.ssh
523
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
524
+ echo "Comparing against first commit to contain version numbers"
525
+ RELEASE_TAG=celo-core-contracts-v1.rc1
526
+ yarn --cwd packages/protocol test:generate-old-devchain-and-build -b $RELEASE_TAG -d .tmp/released_chain -l /dev/stdout
527
+ - persist_to_workspace :
528
+ root : .
529
+ paths :
530
+ - " packages/protocol/.tmp/released_chain/*"
531
+
532
+
466
533
protocol-test-release :
467
534
<< : *defaults
468
535
resource_class : large
@@ -473,14 +540,21 @@ jobs:
473
540
name : Check if the test should run
474
541
command : |
475
542
./scripts/ci_check_if_test_should_run_v2.sh @celo/protocol
543
+ - run :
544
+ name : Copy DevChain and Build generated from released tag
545
+ command : |
546
+ RELEASE_TAG=celo-core-contracts-v1.rc1
547
+ BUILD_AND_DEVCHAIN_DIR=$(echo build/$(echo $RELEASE_TAG | sed -e 's/\//_/g'))
548
+ (cp -r packages/protocol/.tmp/released_chain packages/protocol/$BUILD_AND_DEVCHAIN_DIR)
476
549
- run :
477
550
name : Test release against v2
478
551
command : |
479
552
mkdir -p ~/.ssh
480
553
ssh-keyscan github.com >> ~/.ssh/known_hosts
481
554
echo "Comparing against first commit to contain version numbers"
482
555
RELEASE_TAG=celo-core-contracts-v1.rc1
483
- yarn --cwd packages/protocol test:devchain-release -b $RELEASE_TAG
556
+ BUILD_AND_DEVCHAIN_DIR=$(echo build/$(echo $RELEASE_TAG | sed -e 's/\//_/g'))
557
+ yarn --cwd packages/protocol test:devchain-release -b $RELEASE_TAG -d $BUILD_AND_DEVCHAIN_DIR -l /dev/stdout
484
558
485
559
protocol-test-common :
486
560
<< : *defaults
@@ -612,19 +686,52 @@ jobs:
612
686
- run :
613
687
name : Generate DevChain
614
688
command : |
615
- (cd packages/contractkit && yarn test:reset)
689
+ (cd packages/sdk/ contractkit && yarn test:reset)
616
690
- run :
617
691
name : Run Tests
618
- command : yarn --cwd=packages/contractkit test
692
+ command : yarn --cwd=packages/sdk/contractkit test
693
+ # TODO: remove comment after new docs generation
694
+ # - run:
695
+ # name: Fail if someone forgot to commit contractkit docs
696
+ # command: |
697
+ # yarn --cwd=packages/sdk/contractkit docs
698
+ # if [[ $(git status packages/docs/developer-resources/contractkit --porcelain) ]]; then
699
+ # git --no-pager diff packages/docs/developer-resources/contractkit
700
+ # echo "There are git differences after generating contractkit docs"
701
+ # exit 1
702
+ # fi
703
+ - persist_to_workspace :
704
+ root : .
705
+ paths :
706
+ - " packages/sdk/contractkit/.tmp/devchain.tar.gz"
707
+
708
+ # extrated to reuse the devchain generated by contractkit
709
+ identity-tests :
710
+ << : *defaults
711
+ steps :
712
+ - attach_workspace :
713
+ at : ~/app
619
714
- run :
620
- name : Fail if someone forgot to commit contractkit docs
715
+ name : Copy DevChain generated by Contractkit
621
716
command : |
622
- yarn --cwd=packages/contractkit docs
623
- if [[ $(git status packages/docs/developer-resources/contractkit --porcelain) ]]; then
624
- git --no-pager diff packages/docs/developer-resources/contractkit
625
- echo "There are git differences after generating contractkit docs"
626
- exit 1
627
- fi
717
+ (cp -r packages/sdk/contractkit/.tmp packages/sdk/identity/.tmp)
718
+ - run :
719
+ name : Run Tests
720
+ command : yarn --cwd=packages/sdk/identity test
721
+
722
+ # extrated to reuse the devchain generated by contractkit
723
+ transactions-uri-tests :
724
+ << : *defaults
725
+ steps :
726
+ - attach_workspace :
727
+ at : ~/app
728
+ - run :
729
+ name : Copy DevChain generated by Contractkit
730
+ command : |
731
+ (cp -r packages/sdk/contractkit/.tmp packages/sdk/transactions-uri/.tmp)
732
+ - run :
733
+ name : Run Tests
734
+ command : yarn --cwd=packages/sdk/transactions-uri test
628
735
629
736
cli-test :
630
737
<< : *defaults
@@ -698,10 +805,10 @@ jobs:
698
805
name : Install and test the npm package
699
806
command : |
700
807
set -euo pipefail
701
- cd packages/base
808
+ cd packages/sdk/ base
702
809
yarn pack
703
810
cd /tmp
704
- npm install ~/app/packages/base/*.tgz
811
+ npm install ~/app/packages/sdk/ base/*.tgz
705
812
706
813
utils-test :
707
814
<< : *defaults
@@ -716,13 +823,13 @@ jobs:
716
823
name : Install and test the npm package
717
824
command : |
718
825
set -euo pipefail
719
- cd packages/base
826
+ cd packages/sdk/ base
720
827
yarn pack
721
828
cd ../utils
722
829
yarn pack
723
830
cd /tmp
724
- npm install ~/app/packages/base/*.tgz
725
- npm install ~/app/packages/utils/*.tgz
831
+ npm install ~/app/packages/sdk/ base/*.tgz
832
+ npm install ~/app/packages/sdk/ utils/*.tgz
726
833
727
834
end-to-end-geth-transfer-test :
728
835
<< : *e2e-defaults
@@ -999,17 +1106,33 @@ workflows:
999
1106
- cli-test :
1000
1107
requires :
1001
1108
- install_dependencies
1109
+ - web-test :
1110
+ requires :
1111
+ - install_dependencies
1002
1112
- contractkit-test :
1003
1113
requires :
1004
1114
- install_dependencies
1115
+ - wallets-test :
1116
+ requires :
1117
+ - install_dependencies
1118
+ - identity-tests :
1119
+ requires :
1120
+ - contractkit-test
1121
+ - transactions-uri-tests :
1122
+ requires :
1123
+ - contractkit-test
1005
1124
- mobile-test :
1006
1125
requires :
1007
1126
- lint-checks
1008
1127
- end-to-end-mobile-test-android
1009
1128
- end-to-end-mobile-test-ios
1129
+ - pre-protocol-test-release :
1130
+ requires :
1131
+ - lint-checks
1010
1132
- protocol-test-release :
1011
1133
requires :
1012
1134
- lint-checks
1135
+ - pre-protocol-test-release
1013
1136
- protocol-test-common :
1014
1137
requires :
1015
1138
- lint-checks
0 commit comments