@cryptotaxi247 / kubo / commits / bc7ddef8d

fix(ci): interop test parallelism (#8674)

* fix(ci): interop test parallelism It broke when require got replaced with modern import statement, and CI run all tests four times.. every time. * fix(ci): run interop with 2 vCPUs We often have 3 processes (tests and 2 or more IPFS nodes) * fix(ci): cache npm during interop * fix(ci): run interop on 2xlarge It is similar load as sharness, so let's use same beefy box * fix(ci): enable ipfs-webui it was skipping due to missing chromium binary * fix(ci): force fresh npm cache during interop Needed to pull-in @chainsafe/libp2p-noise@5.0.2

Marcin Rataj committed Jan 17, 2022 at 19:14 UTC bc7ddef8dc5ab7e0f499676007d7204091599e83
1 file changed +13 -1
.circleci/main.yml
+13 -1
@@ -219,10 +219,16 @@ jobs:
219 docker:
220 - image: cimg/go:1.16-node
221 parallelism: 4
222 + resource_class: large
223 steps:
224 - *make_out_dirs
225 - attach_workspace:
226 at: /tmp/circleci-workspace
227 + - restore_cache:
228 + keys:
229 + - v1-interop-{{ .Branch }}-{{ .Revision }}
230 + - v1-interop-{{ .Branch }}-
231 + - v1-interop-
232 - run:
233 name: Installing dependencies
234 command: |
@@ -236,7 +242,7 @@ jobs:
242 command: |
243 mkdir -p /tmp/test-results/interop/
244 export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
239 - npx ipfs-interop -- -t node -f $(sed -n -e "s|^require('\(.*\)')$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split) -- --reporter mocha-circleci-reporter
245 + npx ipfs-interop -- -t node -f $(sed -n -e "s|^import '\(.*\)'$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split --split-by=timings) -- --reporter mocha-circleci-reporter
246 working_directory: ~/ipfs/go-ipfs/interop
247 environment:
248 LIBP2P_TCP_REUSEPORT: false
@@ -244,6 +250,10 @@ jobs:
250 IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
251 - store_test_results:
252 path: /tmp/test-results
253 + - save_cache:
254 + key: v1-interop-{{ .Branch }}-{{ .Revision }}
255 + paths:
256 + - ~/ipfs/go-ipfs/interop/node_modules
257 go-ipfs-api:
258 executor: golang
259 steps:
@@ -326,6 +336,7 @@ jobs:
336 name: Installing dependencies
337 command: |
338 npm install
339 + npx playwright install
340 working_directory: ~/ipfs/go-ipfs/ipfs-webui
341 - run:
342 name: Running upstream tests (finish early if they fail)
@@ -341,6 +352,7 @@ jobs:
352 - save_cache:
353 key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
354 paths:
355 + - ~/.cache/ms-playwright
356 - ~/ipfs/go-ipfs/ipfs-webui/node_modules
357 # We only run build as a test here. DockerHub images are built and published
358 # by Github Action now: https://github.com/ipfs/go-ipfs/pull/8467