-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move smoke-tests to new workflow
- Loading branch information
Showing
3 changed files
with
95 additions
and
117 deletions.
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,93 @@ | ||
name: DNSLink Smoke-tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
env: | ||
KUBO_VER: 'v0.27.0' # kubo daemon used for publishing to IPFS | ||
CLUSTER_CTL_VER: 'v1.0.8' # ipfs-cluster-ctl used by publish-to-ipfs | ||
|
||
jobs: | ||
dnslink: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
link: ${{ steps.dnslink.link }} | ||
dev: ${{ steps.dnslink.dev }} | ||
steps: | ||
- uses: ipfs/download-ipfs-distribution-action@v1 | ||
with: | ||
name: kubo | ||
version: "${{ env.KUBO_VER }}" | ||
- uses: ipfs/start-ipfs-daemon-action@v1 | ||
- name: Read CID from DNSLink at inbrowser.link|dev | ||
id: dnslink | ||
run: | | ||
echo "link=$(ipfs resolve /ipns/inbrowser.link | sed 's|^/ipfs/||')" >> $GITHUB_OUTPUT | ||
echo "dev=$(ipfs resolve /ipns/inbrowser.dev | sed 's|^/ipfs/||')" >> $GITHUB_OUTPUT | ||
smoke-test-cached-http: # basic smoke test that lets us know when stale-while-revalidate caching does not work on either env | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dnslink: | ||
- inbrowser.link | ||
- inbrowser.dev | ||
steps: | ||
- name: Smoke-test instant (cached, stale-while-revalidate) /ipfs-sw-main.js at ${{ matrix.dnslink }} | ||
run: curl --retry 3 --retry-delay 61 --retry-all-errors -v -L "https://${{ matrix.dnslink }}/ipfs-sw-main.js" > /dev/null | ||
|
||
smoke-test-fresh-http: # basic smoke test for getting latest DNSLink DAG over HTTP gateways | ||
needs: dnslink | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
gateway: | ||
- trustless-gateway.link | ||
- cloudflare-ipfs.com | ||
dnslink: | ||
- inbrowser.link | ||
- inbrowser.dev | ||
steps: | ||
- uses: ipfs/download-ipfs-distribution-action@v1 | ||
with: | ||
name: kubo | ||
version: "${{ env.KUBO_VER }}" | ||
- uses: ipfs/start-ipfs-daemon-action@v1 | ||
- name: Try fetching the new CID as CAR from ${{ matrix.gateway }} | ||
run: | | ||
CID=$(ipfs resolve /ipns/${{ matrix.dnslink }} | sed 's|^/ipfs/||') | ||
curl --retry 6 --retry-delay 61 --retry-all-errors -v -L --http1.1 "https://${{ matrix.gateway }}/ipfs/${CID}?format=car" -o dag.car | ||
- name: Confirm the CAR contains the entire DAG | ||
run: ipfs dag import --offline --pin-roots=true dag.car | ||
|
||
smoke-test-fresh-p2p: # basic smoke test for getting latest DNSLink DAG over P2P with Kubo | ||
needs: dnslink | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
routing-type: | ||
- dhtclient | ||
- autoclient | ||
dnslink: | ||
- inbrowser.link | ||
- inbrowser.dev | ||
steps: | ||
- uses: ipfs/download-ipfs-distribution-action@v1 | ||
with: | ||
name: kubo | ||
version: "${{ env.KUBO_VER }}" | ||
- name: Init IPFS daemon | ||
run: | | ||
ipfs init --profile server | ||
ipfs config Routing.Type ${{ matrix.routing-type }} | ||
- uses: ipfs/start-ipfs-daemon-action@v1 | ||
- name: Confirm Kubo can fetch with Routing.Type=${{ matrix.routing-type }} | ||
run: ipfs dag stat /ipns/${{ matrix.dnslink }} |
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 was deleted.
Oops, something went wrong.