ci: switch from testing against js-ipfs to helia (#10042)
* ci: switch interop tests from js-ipfs to helia Fixes #10013 * Update .github/workflows/build.yml Co-authored-by: Henrique Dias <hacdias@gmail.com> --------- Co-authored-by: Henrique Dias <hacdias@gmail.com>
Jorropo committed
Aug 2, 2023 at 17:01 UTC
5bec4d67566f545a8d4965e36ec9b76c3827e63c
2 files changed
+35
-25
.github/workflows/build.yml
+35
-19
@@ -48,45 +48,61 @@ jobs:
48
with:
49
name: kubo
50
path: cmd/ipfs/ipfs
51
- interop:
51
+ helia-interop:
52
needs: [interop-prep]
53
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
54
timeout-minutes: 20
55
defaults:
56
run:
57
shell: bash
58
+ strategy:
59
+ matrix:
60
+ repo-to-test-against: ["helia", "helia-ipns", "helia-unixfs"] # this needs to be manually kept in sync as new helia tests are written
61
steps:
62
- uses: actions/setup-node@v3
63
with:
61
- node-version: 16.12.0
64
+ node-version: lts/*
65
- uses: actions/download-artifact@v3
66
with:
67
name: kubo
68
path: cmd/ipfs
69
- run: chmod +x cmd/ipfs/ipfs
67
- - run: |
68
- echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
70
+ - run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
71
id: npm-cache-dir
72
- uses: actions/cache@v3
73
with:
74
path: ${{ steps.npm-cache-dir.outputs.dir }}
73
- key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }}
74
- restore-keys: |
75
- ${{ runner.os }}-${{ github.job }}-
76
- - run: mkdir interop
77
- - run: |
78
- npm init -y
79
- npm install ipfs@^0.66.0
80
- npm install kubo-rpc-client@^3.0.1
81
- npm install ipfs-interop@^10.0.1
75
+ key: ${{ runner.os }}-${{ github.job }}-${{ matrix.repo-to-test-against }}-${{ hashFiles('**/package-lock.json') }}
76
+ restore-keys: ${{ runner.os }}-${{ github.job }}-${{ matrix.repo-to-test-against }}-
77
+ - run: sudo apt update
78
+ - run: sudo apt install -y libxkbcommon0 libxdamage1 libgbm1 libpango-1.0-0 libcairo2 # dependencies for playwright
79
+ - uses: actions/checkout@v3
80
+ with:
81
+ repository: ipfs/${{ matrix.repo-to-test-against }}
82
+ fetch-depth: 0
83
+ path: interop
84
+ - name: Checkout latest tag
85
+ run: |
86
+ exit 0 # temporary while theses pull requests are released:
87
+ # https://github.com/ipfs/helia/pull/200
88
+ # https://github.com/ipfs/helia-unixfs/pull/68
89
+ # https://github.com/ipfs/helia-ipns/pull/72
90
+ export TAG="$(git describe --tags --abbrev=0)"
91
+ echo "Running tests against: $TAG"
92
+ git checkout "$TAG"
93
working-directory: interop
83
- # Run the interop tests while ignoring the js-js interop test cases
84
- - run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js|js-rv\d?-js))' --parallel
85
- env:
86
- LIBP2P_TCP_REUSEPORT: false
87
- LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
88
- IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs
94
+ - run: npm install
95
+ working-directory: interop
96
+ - run: npm run build
97
working-directory: interop
98
+ - run: npm install
99
+ working-directory: interop/packages/interop
100
+ - run: npm install --ignore-scripts --save "ipfs/npm-go-ipfs#4441b8a60f1cfee3035a9e4bb824dfcca08e9b01" # temporary while https://github.com/ipfs/npm-go-ipfs/pull/62 is being bubbled
101
+ working-directory: interop/packages/interop
102
+ - run: npm test
103
+ working-directory: interop/packages/interop
104
+ env:
105
+ KUBO_BINARY: ${{ github.workspace }}/cmd/ipfs/ipfs
106
go-ipfs-api:
107
needs: [interop-prep]
108
runs-on: ubuntu-latest
docs/RELEASE_ISSUE_TEMPLATE.md
-6
@@ -174,12 +174,6 @@ This section covers tasks to be done during each release.
174
- use `vX.Y.Z(-RCN)` as the Kubo image version
175
- [ ] wait for the [e2e](https://github.com/ipfs/ipfs-companion/actions/workflows/e2e.yml) workflow run to finish
176
</details>
177
-- [ ]  Update Kubo in [interop](https://github.com/ipfs/interop) <details><summary>using `./kuboreleaser release --version vX.Y.Z(-rcN) update-interop` or ...</summary>
178
- - [ ]  check out [ipfs/interop](https://github.com/ipfs/interop)
179
- - [ ]  run `npm install`
180
- - [ ]  create a PR which updates `package.json` and `package-lock.json`
181
- - [ ]  merge the PR
182
- </details>
177
- [ ]  Update Kubo in [ipfs-desktop](https://github.com/ipfs/ipfs-desktop) <details><summary>using `./kuboreleaser release --version vX.Y.Z(-rcN) update-ipfs-desktop` or ...</summary>
178
- [ ] check out [ipfs/ipfs-desktop](https://github.com/ipfs/ipfs-desktop)
179
- [ ] run `npm install`