Skip to content

Commit

Permalink
test(gateway-conformance): also run gateway conformance tests against…
Browse files Browse the repository at this point in the history
… a gateway-over-libp2p endpoint
  • Loading branch information
aschmahmann committed Aug 31, 2023
1 parent 7920327 commit ae66308
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
run: |
./ipfs init
./ipfs config --json Gateway.PublicGateways "$GATEWAY_PUBLIC_GATEWAYS"
./ipfs config --json Experimental.Libp2pStreamMounting true
working-directory: kubo-gateway/cmd/ipfs

# 4. Populate the Kubo gateway with the gateway-conformance fixtures
Expand Down Expand Up @@ -115,3 +116,51 @@ jobs:
with:
name: gateway-conformance.json
path: output.json

# 8. Setup a kubo http-p2p-proxy to run gateway conformance tests
- name: Init p2p-proxy kubo node
env:
IPFS_PATH: "~/.kubo-p2p-proxy"
run: |
./ipfs init --profile=randomports
./ipfs config --json Experimental.Libp2pStreamMounting true
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8081"
working-directory: kubo-gateway/cmd/ipfs

# 9. Start the kubo http-p2p-proxy and setup the forwarder
- name: Start kubo-gateway
env:
IPFS_PATH: "~/.kubo-p2p-proxy"
run: |
gatewayNodeId=$(ipfs id -f="<id>" --api=/ip4/127.0.0.1/tcp/5001)
./ipfs daemon --offline &
./ipfs p2p forward --allow-custom-protocol /http/1.1 /ip4/127.0.0.1/tcp/8082 /p2p/$gatewayNodeId
working-directory: kubo-gateway/cmd/ipfs

# 10. Run the gateway-conformance tests
- name: Run gateway-conformance tests over libp2p
uses: ipfs/gateway-conformance/.github/actions/[email protected]
with:
gateway-url: http://127.0.0.1:8081
json: output.json
xml: output.xml
html: output.html
markdown: output.md
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'

# 11. Upload the results
- name: Upload MD summary
if: failure() || success()
run: cat output.md >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: failure() || success()
uses: actions/upload-artifact@v3
with:
name: gateway-conformance-libp2p.html
path: output.html
- name: Upload JSON report
if: failure() || success()
uses: actions/upload-artifact@v3
with:
name: gateway-conformance-libp2p.json
path: output.json

0 comments on commit ae66308

Please sign in to comment.