Skip to content

Commit

Permalink
fix(ci): interop test parallelism (#8674)
Browse files Browse the repository at this point in the history
* 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/[email protected]
  • Loading branch information
lidel authored Jan 17, 2022
1 parent 4403946 commit bc7ddef
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ jobs:
docker:
- image: cimg/go:1.16-node
parallelism: 4
resource_class: large
steps:
- *make_out_dirs
- attach_workspace:
at: /tmp/circleci-workspace
- restore_cache:
keys:
- v1-interop-{{ .Branch }}-{{ .Revision }}
- v1-interop-{{ .Branch }}-
- v1-interop-
- run:
name: Installing dependencies
command: |
Expand All @@ -236,14 +242,18 @@ jobs:
command: |
mkdir -p /tmp/test-results/interop/
export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
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
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
working_directory: ~/ipfs/go-ipfs/interop
environment:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
- store_test_results:
path: /tmp/test-results
- save_cache:
key: v1-interop-{{ .Branch }}-{{ .Revision }}
paths:
- ~/ipfs/go-ipfs/interop/node_modules
go-ipfs-api:
executor: golang
steps:
Expand Down Expand Up @@ -326,6 +336,7 @@ jobs:
name: Installing dependencies
command: |
npm install
npx playwright install
working_directory: ~/ipfs/go-ipfs/ipfs-webui
- run:
name: Running upstream tests (finish early if they fail)
Expand All @@ -341,6 +352,7 @@ jobs:
- save_cache:
key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
paths:
- ~/.cache/ms-playwright
- ~/ipfs/go-ipfs/ipfs-webui/node_modules
# We only run build as a test here. DockerHub images are built and published
# by Github Action now: https://github.com/ipfs/go-ipfs/pull/8467
Expand Down

0 comments on commit bc7ddef

Please sign in to comment.