Skip to content

Commit

Permalink
fix: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Nov 20, 2023
1 parent d1b45f1 commit 37308bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 158 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,6 @@ defaults:
shell: bash

jobs:
<<<<<<< HEAD
=======
# Pulls the output.json from the latest successful run of the gateway-conformance.yml workflow
# and stores these as an artifacts for the build job.
pull-outputs:
runs-on: "ubuntu-latest"
strategy:
matrix:
target: ["ipfs/kubo", "ipfs/boxo", "ipfs/bifrost-gateway"]
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: get repo details
id: get-details
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_AND_REPO: ${{ matrix.target }}
run: |
DETAILS=$(gh api repos/${OWNER_AND_REPO})
DEFAULT_BRANCH=$(echo $DETAILS | jq -r '.default_branch')
echo "default-branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
NAME=$(echo $DETAILS | jq -r '.name')
echo "name=${NAME}" >> $GITHUB_OUTPUT
- name: Download json output
id: download-artifact
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
with:
workflow: gateway-conformance.yml
workflow_conclusion: "completed" # TODO: ideally we could request success|failure (https://github.com/dawidd6/action-download-artifact#usage)
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.get-details.outputs.default-branch }}
name: gateway-conformance.json
repo: ${{ matrix.target }}
if_no_artifact_found: fail
allow-forks: false
- name: Upload JSON output
if: (failure() || success())
uses: actions/upload-artifact@v3
with:
name: conformance-${{ steps.get-details.outputs.name }}.json
path: ./output.json
# https://github.com/actions/starter-workflows/blob/4a8f18e34dd13d2b6ee4d8da2ba72629eafe1609/pages/hugo.yml#L1
>>>>>>> b7deea7b (fix: prevent forks)
build:
runs-on: ubuntu-latest
env:
Expand Down
62 changes: 25 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
> A tool designed to test if an IPFS Gateway implementation complies with the [IPFS Gateway Specification](https://specs.ipfs.tech/http-gateways/) correctly.
> Distributed as a Docker image, as well as a GitHub Action(s).
- [Implementation Dashboard](#implementation-dashboard)
- [How it Works](#how-it-works)
- [Adding Your Implementation](#adding-your-implementation)
- [Dashboard](#dashboard)
- [Commands](#commands)
- [`test`](#test)
- [Inputs](#inputs)
Expand All @@ -20,28 +18,41 @@
- [Local Development](#local-development)
- [Examples](#examples)
- [APIs](#apis)
- [Dashboard](#dashboard)
- [Adding your gateway to the dashboard](#adding-your-gateway-to-the-dashboard)
- [Building the Dashboard](#building-the-dashboard)
- [FAQ](#faq)
- [In Development](#in-development)

## Implementation Dashboard
## Dashboard

The [Implementation Dashboard](https://ipfs.github.io/gateway-conformance/) is a view that showcases different implementations of IPFS Gateways. It ensures the transparency and clarity of each implementation by utilizing the results from their latest gateway-conformance runs from their Continuous Integration (CI).
The [Implementation Dashboard](https://ipfs.github.io/gateway-conformance/) is a view that showcases different implementations of IPFS Gateways. This dashboard aggregates results from many test runs and renders them on a static website. This'll give you more detailed insights and navigation options.

### How it Works

For every implementations that have been added to the workflow, our dashboard generation workflow loads their most recent `gateway-conformance` test results from their CI.
For every implementations that have been added to the `REPOSITORIES` file, our dashboard generation workflow loads the most recent `gateway-conformance` test results from their CI. You can try this locally with the `make website` command.

### Adding Your Implementation
### Adding your gateway to the dashboard

To include your implementation in the dashboard:
The dashboard is hosted at [conformance.ipfs.tech](https://conformance.ipfs.tech/). It aggregates test outputs from various IPFS implementations and renders them on a static website.

1. Create a Pull Request modifying the file `/.github/workflows/deploy-pages.yml` and append your repository to the list of implementations.
2. Ensure you have a workflow titled "gateway-conformance.yml" in your repository which is responsible for generating the `gateway-conformance.json` artifact.
To add your gateway to the dashboard, you need to:

For reference, you may review other implementations, like Boxo's [here](https://github.com/ipfs/boxo/blob/main/.github/workflows/gateway-conformance.yml).
- Ensure that your gateway's repository is public.
- Ensure your gateway generates generates the `output.json` file in a `gateway-conformance.yml` file. Check [kubo's workflow](https://github.com/ipfs/kubo/blob/master/.github/workflows/gateway-conformance.yml) for an example.
- Add your gateway to the list of repositories in the [REPOSITORIES](./REPOSITORIES) file.

Once you join the dashboard, your test results will be picked up automatically and your implementation will show up on the dashboard.

### Building the Dashboard

- Set up a GitHub Token: Ensure you have a GitHub Token with `repo:read` scope. This is required to download artifacts.
- Run the Build Command: `GH_TOKEN=your_github_token make website`

This command downloads the latest test artifacts from the repositories listed in the `./REPOSITORIES` file. Then it generates a static website with Hugo in the `www/public` directory.

### How to work on the Dashboard

- Use `make website` to generate all the assets required to build the static dashboard
- Use `cd ./www && hugo server` to start a local server with live-reload
- Use `cd ./www/themes/conformance && npm run build` to re-build the theme's styles

## Commands

Expand Down Expand Up @@ -324,29 +335,6 @@ This templating is used almost everywhere in the test sugar, for example in requ
Request().Path("ipfs/{{cid}}", myCid) // will use "ipfs/Qm...."
```

## Dashboard

The gateway conformance test suite includes a web dashboard. This dashboard aggregates results from many test runs and renders them on a static website. This'll give you more detailed insights and navigation options.

### Adding your gateway to the dashboard

The dashboard is hosted at [conformance.ipfs.tech](https://conformance.ipfs.tech/). It aggregates test outputs from various IPFS implementations and renders them on a static website.

To add your gateway to the dashboard, you need to:

- Ensure that your gateway's repository is public.
- Ensure your gateway generates generates the `output.json` file in a `gateway-conformance.yml` file. Check [kubo's workflow](https://github.com/ipfs/kubo/blob/master/.github/workflows/gateway-conformance.yml) for an example.
- Add your gateway to the list of repositories in the [REPOSITORIES](./REPOSITORIES) file.

Once you join the dashboard, your test results will be picked up automatically and your implementation will show up on the dashboard.

### Building the Dashboard

- Set up a GitHub Token: Ensure you have a GitHub Token with `repo:read` scope. This is required to download artifacts.
- Run the Build Command: `GH_TOKEN=your_github_token make website`

This command downloads the latest test artifacts from the repositories listed in the `./REPOSITORIES` file. Then it generates a static website with Hugo in the `www/public` directory.

## FAQ

### How to generate XML, HTML and Markdown reports when using the tool as a Docker container?
Expand Down
3 changes: 3 additions & 0 deletions www/content/current.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: By Reference Implementation
published: true
menu:
main:
weight: 10
---

This table shows the test results organized by test groups and reference implementations. Click on any row or cell to drill down into the tests results.
Expand Down
2 changes: 0 additions & 2 deletions www/themes/conformance/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
{{- partial "head.html" . -}}
</head>

{{- partial "ribbon.html" . -}}

<body>
{{- partial "header.html" . -}}

Expand Down
3 changes: 1 addition & 2 deletions www/themes/conformance/layouts/partials/result-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
href="{{ absURL (path.Join "results" $implementation) }}">
{{ $implementation }}
</a>

</th>
{{ end }}
{{ end }}
Expand Down Expand Up @@ -136,4 +135,4 @@
</tr>
{{ end }}
</tbody>
</table>
</table>
70 changes: 0 additions & 70 deletions www/themes/conformance/layouts/partials/ribbon.html

This file was deleted.

0 comments on commit 37308bb

Please sign in to comment.