diff --git a/.circleci/config.yml b/.circleci/config.yml index 978534296b..8e5176f7d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,7 +60,7 @@ jobs: build: docker: - *node_image - resource_class: large + resource_class: xlarge working_directory: *working_directory steps: - checkout @@ -78,11 +78,14 @@ jobs: - ~/.cache/yarn - run: name: Build all packages with lerna - command: 'yarn build --since master' + command: 'yarn build' - persist_to_workspace: root: *working_directory paths: - ./ + - ./.nx-cache + - packages/*/dist + - packages/*/*.tsbuildinfo lint: docker: - *node_image @@ -108,12 +111,14 @@ jobs: name: 'Test unit' command: | yarn test \ - --since master \ + --ignore @requestnetwork/request-node \ + --ignore @requestnetwork/ethereum-storage \ --ignore @requestnetwork/request-client.js \ --ignore @requestnetwork/smart-contracts \ --ignore @requestnetwork/payment-detection \ --ignore @requestnetwork/payment-processor \ - --ignore @requestnetwork/integration-test + --ignore @requestnetwork/integration-test \ + --concurrency=2 - store_test_results: path: packages/advance-logic/reports/ - store_test_results: @@ -126,16 +131,12 @@ jobs: path: packages/epk-cipher/reports/ - store_test_results: path: packages/epk-decryption/reports/ - - store_test_results: - path: packages/ethereum-storage/reports/ - store_test_results: path: packages/lit-protocol-cipher/reports/ - store_test_results: path: packages/multi-format/reports/ - store_test_results: path: packages/request-logic/reports/ - - store_test_results: - path: packages/request-node/reports/ - store_test_results: path: packages/thegraph-data-access/reports/ - store_test_results: @@ -152,7 +153,7 @@ jobs: - *ganache_image - *postgres_image - *graph_image - resource_class: large + resource_class: xlarge working_directory: *working_directory steps: - attach_workspace: @@ -165,11 +166,15 @@ jobs: name: 'Test request-client.js, smart-contracts, payment-detection and payment-processor' command: | yarn test \ - --since master \ + --scope @requestnetwork/request-node \ + --scope @requestnetwork/ethereum-storage \ --scope @requestnetwork/request-client.js \ --scope @requestnetwork/smart-contracts \ --scope @requestnetwork/payment-detection \ - --scope @requestnetwork/payment-processor + --scope @requestnetwork/payment-processor \ + --concurrency=1 + - store_test_results: + path: packages/request-node/reports/ - store_test_results: path: packages/request-client.js/reports/ - store_test_results: @@ -178,6 +183,8 @@ jobs: path: packages/payment-detection/reports/ - store_test_results: path: packages/payment-processor/reports/ + - store_test_results: + path: packages/ethereum-storage/reports/ test-integration-with-request-node: docker: - *node_image @@ -203,7 +210,6 @@ jobs: name: 'Test integration-test' command: | yarn test \ - --since master \ --scope @requestnetwork/integration-test - store_test_results: path: packages/integration-test/reports/ @@ -274,6 +280,9 @@ jobs: - run: name: 'Authenticate with registry' command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc + - run: + name: 'Build all packages with lerna' + command: 'yarn build --skip-nx-cache' - run: name: 'Publish' command: | diff --git a/.gitignore b/.gitignore index 2f749745d3..4e85d3d789 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,6 @@ tsconfig.build.tsbuildinfo /packages/smart-contracts/types/ /packages/smart-contracts/src/types/ /packages/smart-contracts/build-zk/ -/packages/smart-contracts/cache-zk/ \ No newline at end of file +/packages/smart-contracts/cache-zk/ + +.nx-cache/ \ No newline at end of file diff --git a/nx.json b/nx.json index 20cba77dda..10c52ed172 100644 --- a/nx.json +++ b/nx.json @@ -3,7 +3,10 @@ "default": { "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": ["build", "test", "lint:check"] + "cacheableOperations": ["build", "test", "lint:check"], + "cacheDirectory": ".nx-cache", + "parallel": 3, + "fileHashVersion": 2 } } },