From d6e49fc8502797666da46802fd0b6f853af1a2c4 Mon Sep 17 00:00:00 2001 From: Jorropo Date: Tue, 1 Aug 2023 16:48:11 +0200 Subject: [PATCH] ci: switch interop tests from js-ipfs to helia --- .github/workflows/build.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33d9f828a99..1d3b33460f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,9 @@ jobs: defaults: run: shell: bash + strategy: + matrix: + repo-to-test-against: ["helia", "helia-ipns", "helia-unixfs"] # this needs to be manually kept in sync as new helia tests are written steps: - uses: actions/setup-node@v3 with: @@ -73,20 +76,21 @@ jobs: key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-${{ github.job }}- - - run: mkdir interop - - run: | - npm init -y - npm install ipfs@^0.66.0 - npm install kubo-rpc-client@^3.0.1 - npm install ipfs-interop@^10.0.1 + - uses: actions/checkout@v3 + with: + repository: github.com/ipfs/${{ matrix.repo-to-test-against }} + depth: 0 + path: interop + - run: git checkout "$(git tag | grep -E "^v[0-9]+\\.[0-9]+\\.[0-9]+\$" | sort --version-sort --reverse | head -n1)" working-directory: interop - # Run the interop tests while ignoring the js-js interop test cases - - run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js|js-rv\d?-js))' --parallel + - run: | + npm install --save "git+https://github.com/ipfs/npm-go-ipfs.git#4441b8a60f1cfee3035a9e4bb824dfcca08e9b01" # temporary while https://github.com/ipfs/npm-go-ipfs/pull/62 is being bubbled + npm install + working-directory: interop/packages/interop + - run: npm test env: - LIBP2P_TCP_REUSEPORT: false - LIBP2P_ALLOW_WEAK_RSA_KEYS: 1 - IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs - working-directory: interop + KUBO_BINARY: ${{ github.workspace }}/cmd/ipfs/ipfs + working-directory: interop/packages/interop go-ipfs-api: needs: [interop-prep] runs-on: ubuntu-latest