This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from ipfs/ci/gateway-conformance
* ci: add gateway-confromance test suite to the CI * fix: disable subdomain-gateway tests * fix: disable TestGatewayCar * ci: pin gateway-conformance to a SHA because it doesn't have release tags yet * ci: update triggers for gateway-conformance workflow * chore: enable subdomain tests, add env variable * fix: support http.MethodConnect * docs: environment variables for testing * fix: exclude TestGatewayCar/GET_response_for_application/vnd.ipld.car only * ci: exclude only Content-Length check from the TestGatewayCar test * ci: use v0.0 of gateway-conformance actions --------- Co-authored-by: Henrique Dias <hacdias@gmail.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>
- Loading branch information
Showing
3 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
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@v0.0 | ||
with: | ||
output: fixtures | ||
|
||
# 3. Populate the Kubo gateway with the gateway-conformance fixtures | ||
- name: Import fixtures | ||
run: find ./fixtures -name '*.car' -exec ipfs dag import --pin-roots=false {} \; | ||
|
||
# 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@v0.0 | ||
with: | ||
gateway-url: http://127.0.0.1:8081 | ||
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' | ||
|
||
# 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 |
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
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