chore: upgrade range request module to v0.6 (#448) #12
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: | |
- main | |
- gateway-conformance | |
paths: | |
- ".github/workflows/gateway-conformance.yml" | |
- "container/**" | |
- "Dockerfile" | |
pull_request: | |
env: | |
L1_PORT: 8082 | |
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 | |
- name: Make fixtures dir | |
run: mkdir -p ${{ runner.temp }}/fixtures | |
# 2. Download the gateway-conformance fixtures | |
- name: Download gateway-conformance fixtures | |
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.0 | |
with: | |
output: "${{ runner.temp }}/fixtures" | |
# 3. Populate the Kubo gateway with the gateway-conformance fixtures | |
- name: Import fixtures | |
run: find "${{ runner.temp }}/fixtures" -name '*.car' -exec ipfs dag import --pin-roots=false {} \; | |
# 4. Build the L1 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build local Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
tags: saturn-node | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
load: true | |
build-args: | | |
SATURN_NETWORK=local | |
ORCHESTRATOR_URL=http://localhost | |
LOG_INGESTOR_URL=http://localhost | |
# 5. Start the L1 | |
- name: Start L1 | |
run: | | |
export HTTP_PORT=${{ env.L1_PORT }} | |
export ORCHESTRATOR_REGISTRATION=false | |
# Configure lassie to fetch only from the localhost kubo | |
export LASSIE_ALLOW_PROVIDERS=$(ipfs id | jq --raw-output '.Addresses | @csv | sub("\"";"";"g") ') | |
sh scripts/run.sh & | |
num_attempts=0 | |
max_attempts=5 | |
url="http://localhost:${HTTP_PORT}" | |
# wait for the container to be up | |
until curl -s "$url" -o /dev/null; do | |
if [ ${num_attempts} -eq ${max_attempts} ];then | |
echo "Max attempts reached" | |
exit 1 | |
fi | |
num_attempts=$(($num_attempts+1)) | |
sleep 5; | |
done | |
# 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:${{ env.L1_PORT }} | |
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 -run "TestGatewayCar|TestGatewayBlock"' | |
# 7. Upload the results | |
- name: Upload Markdown 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 |