Skip to content

Commit

Permalink
ci: switch interop tests from js-ipfs to helia
Browse files Browse the repository at this point in the history
Fixes #10013
  • Loading branch information
Jorropo committed Aug 1, 2023
1 parent 89b0432 commit d51a5eb
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,59 @@ jobs:
with:
name: kubo
path: cmd/ipfs/ipfs
interop:
helias:
needs: [interop-prep]
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
timeout-minutes: 20
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:
node-version: 16.12.0
node-version: lts/*
- uses: actions/download-artifact@v3
with:
name: kubo
path: cmd/ipfs
- run: chmod +x cmd/ipfs/ipfs
- run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
id: npm-cache-dir
- uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-
- run: mkdir interop
restore-keys: ${{ runner.os }}-${{ github.job }}-${{ matrix.repo-to-test-against }}
- uses: actions/checkout@v3
with:
repository: ipfs/${{ matrix.repo-to-test-against }}
fetch-depth: 0
path: 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
exit 0 # temporary while theses pull requests are released:
# https://github.com/ipfs/helia/pull/200
# https://github.com/ipfs/helia-unixfs/pull/68
# https://github.com/ipfs/helia-ipns/pull/72
export TAG="$(git describe --tags --abbrev=0)"
echo "Running tests against: $TAG"
git checkout "$TAG"
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
env:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs
- run: npm install
working-directory: interop
- run: npm run build
working-directory: interop
- run: |
npm install
npm install --ignore-scripts --save "ipfs/npm-go-ipfs#4441b8a60f1cfee3035a9e4bb824dfcca08e9b01" # temporary while https://github.com/ipfs/npm-go-ipfs/pull/62 is being bubbled
sudo npx playwright install-deps
working-directory: interop/packages/interop
- run: npm test
env:
KUBO_BINARY: ${{ github.workspace }}/cmd/ipfs/ipfs
working-directory: interop/packages/interop
go-ipfs-api:
needs: [interop-prep]
runs-on: ubuntu-latest
Expand Down

0 comments on commit d51a5eb

Please sign in to comment.