Commit e8cfdd7f authored by achingbrain's avatar achingbrain

chore: use published ipfs-interop module instead of master branch

Changes the CI pipeline to use a published version of the `ipfs-interop`
module instead of whatever's the HEAD of master in order to control
the versions of what's being tested.

Otherwise it becomes hard to release breaking changes in an ordered
fashion.
parent 3d3c0361
...@@ -58,8 +58,8 @@ executors: ...@@ -58,8 +58,8 @@ executors:
IPFS_REUSEPORT: false IPFS_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1 LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
E2E_IPFSD_TYPE: go E2E_IPFSD_TYPE: go
dockerizer: dockerizer:
docker: docker:
- image: circleci/golang:1.14.4 - image: circleci/golang:1.14.4
environment: environment:
IMAGE_NAME: ipfs/go-ipfs IMAGE_NAME: ipfs/go-ipfs
...@@ -100,7 +100,7 @@ jobs: ...@@ -100,7 +100,7 @@ jobs:
- run: | - run: |
make -j 1 test/unit/gotest.junit.xml \ make -j 1 test/unit/gotest.junit.xml \
&& [[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]] && [[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
- run: - run:
when: always when: always
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
...@@ -170,36 +170,20 @@ jobs: ...@@ -170,36 +170,20 @@ jobs:
- *make_out_dirs - *make_out_dirs
- attach_workspace: - attach_workspace:
at: /tmp/circleci-workspace at: /tmp/circleci-workspace
- run:
name: Cloning
command: |
git clone https://github.com/ipfs/interop.git
git -C interop log -1
- restore_cache:
keys:
- v2-interop-{{ checksum "~/ipfs/go-ipfs/interop/package-lock.json" }}
- v2-interop-
- run: - run:
name: Installing dependencies name: Installing dependencies
command: | command: |
npm install npm init -y
working_directory: ~/ipfs/go-ipfs/interop npm install ipfs@^0.47.0
- save_cache: npm install ipfs-interop@^1.0.0
key: v2-interop-{{ checksum "~/ipfs/go-ipfs/interop/package-lock.json" }} npm install mocha-circleci-reporter@0.0.3
paths:
- ~/ipfs/go-ipfs/interop/node_modules
- run:
name: Installing reporting tools
command: |
npm install --save-dev mocha-circleci-reporter@0.0.3
working_directory: ~/ipfs/go-ipfs/interop working_directory: ~/ipfs/go-ipfs/interop
- run: - run:
name: Running tests name: Running tests
command: | command: |
mkdir -p /tmp/test-results/interop/ mkdir -p /tmp/test-results/interop/
export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)" export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
node_modules/.bin/mocha --reporter mocha-circleci-reporter \ node_modules/.bin/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
$(sed -n -e "s|^require('\(.*\)')$|test/\1|p" test/node.js | circleci tests split)
working_directory: ~/ipfs/go-ipfs/interop working_directory: ~/ipfs/go-ipfs/interop
environment: environment:
IPFS_REUSEPORT: false IPFS_REUSEPORT: false
...@@ -386,12 +370,12 @@ workflows: ...@@ -386,12 +370,12 @@ workflows:
# also means tag-based jobs can only depend on other tag-based jobs, so we # also means tag-based jobs can only depend on other tag-based jobs, so we
# use a separate workflow because every job needs to be tagged together. # use a separate workflow because every job needs to be tagged together.
# see: https://circleci.com/docs/2.0/workflows/#executing-workflows-for-a-git-tag # see: https://circleci.com/docs/2.0/workflows/#executing-workflows-for-a-git-tag
docker-on-tag: docker-on-tag:
jobs: jobs:
- docker-build: - docker-build:
filters: *only-version-tags filters: *only-version-tags
- docker-push: - docker-push:
context: dockerhub context: dockerhub
filters: *only-version-tags filters: *only-version-tags
requires: requires:
- docker-build - docker-build
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment