fix: allow daemon to start correctly if the API is null #885
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gateway Conformance | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
gateway-conformance: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
# 1. Download the gateway-conformance fixtures | |
- name: Download gateway-conformance fixtures | |
uses: ipfs/gateway-conformance/.github/actions/[email protected] | |
with: | |
output: fixtures | |
# 2. Build the kubo-gateway | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- name: Checkout kubo-gateway | |
uses: actions/checkout@v3 | |
with: | |
path: kubo-gateway | |
- name: Build kubo-gateway | |
run: make build | |
working-directory: kubo-gateway | |
# 3. Start the kubo-gateway | |
- name: Start kubo-gateway | |
env: | |
GATEWAY_PUBLIC_GATEWAYS: | | |
{ | |
"example.com": { | |
"UseSubdomains": true, | |
"Paths": ["/ipfs", "/ipns"] | |
}, | |
"localhost": { | |
"UseSubdomains": true, | |
"InlineDNSLink": true, | |
"Paths": ["/ipfs", "/ipns"] | |
} | |
} | |
run: | | |
./ipfs init | |
./ipfs config --json Gateway.PublicGateways "$GATEWAY_PUBLIC_GATEWAYS" | |
./ipfs daemon --offline & | |
working-directory: kubo-gateway/cmd/ipfs | |
# 4. Populate the Kubo gateway with the gateway-conformance fixtures | |
- name: Import fixtures | |
run: find ./fixtures -name '*.car' -exec kubo-gateway/cmd/ipfs/ipfs dag import --pin-roots=false {} \; | |
# 5. Run the gateway-conformance tests | |
- name: Run gateway-conformance tests | |
uses: ipfs/gateway-conformance/.github/actions/[email protected] | |
with: | |
gateway-url: http://127.0.0.1:8080 | |
json: output.json | |
xml: output.xml | |
html: output.html | |
markdown: output.md | |
args: -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length' | |
# 6. 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 |