Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

feat: IPIP-402 based backpressure #254

feat: IPIP-402 based backpressure

feat: IPIP-402 based backpressure #254

name: Gateway Conformance
on:
push:
branches:
- main
pull_request:
jobs:
gateway-conformance:
runs-on: ubuntu-latest
steps:
# 1. Start the Kubo gateway
- name: Download Kubo gateway
uses: ipfs/download-ipfs-distribution-action@v1
- name: Start Kubo gateway
uses: ipfs/start-ipfs-daemon-action@v1
# 2. Download the gateway-conformance fixtures
- name: Download gateway-conformance fixtures
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@de83c0c7459765534697ab0bf28079feba3fa865
with:
output: fixtures
# 3. Populate the Kubo gateway with the gateway-conformance fixtures
- name: Import fixtures
run: |
# Import car files
find ./fixtures -name '*.car' -exec ipfs dag import --pin-roots=false {} \;
# Import dnslink records
# the IPFS_NS_MAP env will be used by the daemon
export IPFS_NS_MAP=$(cat "./fixtures/dnslinks.json" | jq -r '.subdomains | to_entries | map("\(.key).example.com:\(.value)") | join(",")')
export IPFS_NS_MAP="$(cat "./fixtures/dnslinks.json" | jq -r '.domains | to_entries | map("\(.key):\(.value)") | join(",")'),${IPFS_NS_MAP}"
echo "IPFS_NS_MAP=${IPFS_NS_MAP}" >> $GITHUB_ENV
# 4. Build the bifrost-gateway
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Checkout bifrost-gateway
uses: actions/checkout@v3
with:
path: bifrost-gateway
- name: Build bifrost-gateway
run: go build
working-directory: bifrost-gateway
# 5. Start the bifrost-gateway
- name: Start bifrost-gateway
env:
PROXY_GATEWAY_URL: http://127.0.0.1:8080
GATEWAY_CONFORMANCE_TEST: true
run: ./bifrost-gateway &
working-directory: bifrost-gateway
# 6. Run the gateway-conformance tests
- name: Run gateway-conformance tests
uses: ipfs/gateway-conformance/.github/actions/test@de83c0c7459765534697ab0bf28079feba3fa865
with:
gateway-url: http://127.0.0.1:8081
json: output.json
xml: output.xml
html: output.html
markdown: output.md
specs: +trustless-gateway,-trustless-ipns-gateway,+path-gateway,-path-ipns-gateway,+subdomain-gateway,-subdomain-ipns-gateway,+dnslink-gateway
args: -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
# 7. 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.html
path: output.html