From fca50c4fae107262b1975c542284a73b0bfa7966 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 29 Sep 2023 10:24:34 +1000 Subject: [PATCH 1/5] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e27724e2..ede71996e 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ [![Made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) This repository contains: -* interoperability and end to end tests for libp2p modules across different implementations and versions +* interoperability tests for libp2p's transport layers modules across different implementations and versions * components to run performance benchmarks for different libp2p implementations -## Multidimensional Interop +## Transport Interop ### Specs -Please see our first specification for interoperability tests between transports, multiplexers, and secure channels here: [Interoperability Test Specs](./multidim-interop/README.md) +Please see our first specification for interoperability tests between transports, multiplexers, and secure channels here: [Transport Interoperability Test Specs](./multidim-interop/README.md) More specs to come soon! From f3c2f4fd94f3f0710ffdc5496816ba2bd40a89a4 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 29 Sep 2023 10:24:51 +1000 Subject: [PATCH 2/5] Rename `multidim-interop` to `transport-interop` --- README.md | 2 +- {multidim-interop => transport-interop}/.gitignore | 0 {multidim-interop => transport-interop}/Makefile | 0 {multidim-interop => transport-interop}/README.md | 0 .../compose-spec/compose-spec.json | 0 .../compose-spec/compose-spec.ts | 0 {multidim-interop => transport-interop}/dockerBuildWrapper.sh | 0 {multidim-interop => transport-interop}/helpers/cache.ts | 0 {multidim-interop => transport-interop}/impl/go/.gitignore | 0 {multidim-interop => transport-interop}/impl/go/v0.29/Makefile | 0 .../impl/go/v0.29/version.lock | 0 {multidim-interop => transport-interop}/impl/go/v0.30/Makefile | 0 .../impl/go/v0.30/version.lock | 0 {multidim-interop => transport-interop}/impl/go/v0.31/Makefile | 0 .../impl/go/v0.31/version.lock | 0 {multidim-interop => transport-interop}/impl/java/.gitignore | 0 .../impl/java/v0.0.1/Makefile | 0 {multidim-interop => transport-interop}/impl/js/.gitignore | 0 .../impl/js/v0.45/BrowserDockerfile | 0 .../impl/js/v0.45/Dockerfile | 0 {multidim-interop => transport-interop}/impl/js/v0.45/Makefile | 0 .../impl/js/v0.46/BrowserDockerfile | 0 .../impl/js/v0.46/Dockerfile | 0 {multidim-interop => transport-interop}/impl/js/v0.46/Makefile | 0 .../impl/js/v0.46/package-lock.json | 0 .../impl/js/v0.46/package.json | 0 {multidim-interop => transport-interop}/impl/nim/mainv1.nim | 0 .../impl/nim/v1.0/.gitignore | 0 .../impl/nim/v1.0/Dockerfile | 0 {multidim-interop => transport-interop}/impl/nim/v1.0/Makefile | 0 .../impl/rust-chromium/.gitignore | 0 .../impl/rust-chromium/v0.52/Makefile | 0 {multidim-interop => transport-interop}/impl/rust/.gitignore | 0 .../impl/rust/v0.51/Makefile | 0 .../impl/rust/v0.52/Makefile | 0 {multidim-interop => transport-interop}/impl/zig/.gitignore | 0 .../impl/zig/v0.0.1/Makefile | 0 {multidim-interop => transport-interop}/package-lock.json | 0 {multidim-interop => transport-interop}/package.json | 0 {multidim-interop => transport-interop}/renderResults.ts | 0 {multidim-interop => transport-interop}/src/compose-runner.ts | 0 .../src/compose-stdout-helper.ts | 0 {multidim-interop => transport-interop}/src/generator.ts | 0 {multidim-interop => transport-interop}/src/lib.ts | 0 {multidim-interop => transport-interop}/testplans.ts | 0 {multidim-interop => transport-interop}/tsconfig.json | 0 {multidim-interop => transport-interop}/versions.ts | 0 47 files changed, 1 insertion(+), 1 deletion(-) rename {multidim-interop => transport-interop}/.gitignore (100%) rename {multidim-interop => transport-interop}/Makefile (100%) rename {multidim-interop => transport-interop}/README.md (100%) rename {multidim-interop => transport-interop}/compose-spec/compose-spec.json (100%) rename {multidim-interop => transport-interop}/compose-spec/compose-spec.ts (100%) rename {multidim-interop => transport-interop}/dockerBuildWrapper.sh (100%) rename {multidim-interop => transport-interop}/helpers/cache.ts (100%) rename {multidim-interop => transport-interop}/impl/go/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/go/v0.29/Makefile (100%) rename {multidim-interop => transport-interop}/impl/go/v0.29/version.lock (100%) rename {multidim-interop => transport-interop}/impl/go/v0.30/Makefile (100%) rename {multidim-interop => transport-interop}/impl/go/v0.30/version.lock (100%) rename {multidim-interop => transport-interop}/impl/go/v0.31/Makefile (100%) rename {multidim-interop => transport-interop}/impl/go/v0.31/version.lock (100%) rename {multidim-interop => transport-interop}/impl/java/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/java/v0.0.1/Makefile (100%) rename {multidim-interop => transport-interop}/impl/js/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/js/v0.45/BrowserDockerfile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.45/Dockerfile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.45/Makefile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.46/BrowserDockerfile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.46/Dockerfile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.46/Makefile (100%) rename {multidim-interop => transport-interop}/impl/js/v0.46/package-lock.json (100%) rename {multidim-interop => transport-interop}/impl/js/v0.46/package.json (100%) rename {multidim-interop => transport-interop}/impl/nim/mainv1.nim (100%) rename {multidim-interop => transport-interop}/impl/nim/v1.0/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/nim/v1.0/Dockerfile (100%) rename {multidim-interop => transport-interop}/impl/nim/v1.0/Makefile (100%) rename {multidim-interop => transport-interop}/impl/rust-chromium/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/rust-chromium/v0.52/Makefile (100%) rename {multidim-interop => transport-interop}/impl/rust/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/rust/v0.51/Makefile (100%) rename {multidim-interop => transport-interop}/impl/rust/v0.52/Makefile (100%) rename {multidim-interop => transport-interop}/impl/zig/.gitignore (100%) rename {multidim-interop => transport-interop}/impl/zig/v0.0.1/Makefile (100%) rename {multidim-interop => transport-interop}/package-lock.json (100%) rename {multidim-interop => transport-interop}/package.json (100%) rename {multidim-interop => transport-interop}/renderResults.ts (100%) rename {multidim-interop => transport-interop}/src/compose-runner.ts (100%) rename {multidim-interop => transport-interop}/src/compose-stdout-helper.ts (100%) rename {multidim-interop => transport-interop}/src/generator.ts (100%) rename {multidim-interop => transport-interop}/src/lib.ts (100%) rename {multidim-interop => transport-interop}/testplans.ts (100%) rename {multidim-interop => transport-interop}/tsconfig.json (100%) rename {multidim-interop => transport-interop}/versions.ts (100%) diff --git a/README.md b/README.md index ede71996e..e37c9f1de 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This repository contains: ## Transport Interop ### Specs -Please see our first specification for interoperability tests between transports, multiplexers, and secure channels here: [Transport Interoperability Test Specs](./multidim-interop/README.md) +Please see our first specification for interoperability tests between transports, multiplexers, and secure channels here: [Transport Interoperability Test Specs](transport-interop/README.md) More specs to come soon! diff --git a/multidim-interop/.gitignore b/transport-interop/.gitignore similarity index 100% rename from multidim-interop/.gitignore rename to transport-interop/.gitignore diff --git a/multidim-interop/Makefile b/transport-interop/Makefile similarity index 100% rename from multidim-interop/Makefile rename to transport-interop/Makefile diff --git a/multidim-interop/README.md b/transport-interop/README.md similarity index 100% rename from multidim-interop/README.md rename to transport-interop/README.md diff --git a/multidim-interop/compose-spec/compose-spec.json b/transport-interop/compose-spec/compose-spec.json similarity index 100% rename from multidim-interop/compose-spec/compose-spec.json rename to transport-interop/compose-spec/compose-spec.json diff --git a/multidim-interop/compose-spec/compose-spec.ts b/transport-interop/compose-spec/compose-spec.ts similarity index 100% rename from multidim-interop/compose-spec/compose-spec.ts rename to transport-interop/compose-spec/compose-spec.ts diff --git a/multidim-interop/dockerBuildWrapper.sh b/transport-interop/dockerBuildWrapper.sh similarity index 100% rename from multidim-interop/dockerBuildWrapper.sh rename to transport-interop/dockerBuildWrapper.sh diff --git a/multidim-interop/helpers/cache.ts b/transport-interop/helpers/cache.ts similarity index 100% rename from multidim-interop/helpers/cache.ts rename to transport-interop/helpers/cache.ts diff --git a/multidim-interop/impl/go/.gitignore b/transport-interop/impl/go/.gitignore similarity index 100% rename from multidim-interop/impl/go/.gitignore rename to transport-interop/impl/go/.gitignore diff --git a/multidim-interop/impl/go/v0.29/Makefile b/transport-interop/impl/go/v0.29/Makefile similarity index 100% rename from multidim-interop/impl/go/v0.29/Makefile rename to transport-interop/impl/go/v0.29/Makefile diff --git a/multidim-interop/impl/go/v0.29/version.lock b/transport-interop/impl/go/v0.29/version.lock similarity index 100% rename from multidim-interop/impl/go/v0.29/version.lock rename to transport-interop/impl/go/v0.29/version.lock diff --git a/multidim-interop/impl/go/v0.30/Makefile b/transport-interop/impl/go/v0.30/Makefile similarity index 100% rename from multidim-interop/impl/go/v0.30/Makefile rename to transport-interop/impl/go/v0.30/Makefile diff --git a/multidim-interop/impl/go/v0.30/version.lock b/transport-interop/impl/go/v0.30/version.lock similarity index 100% rename from multidim-interop/impl/go/v0.30/version.lock rename to transport-interop/impl/go/v0.30/version.lock diff --git a/multidim-interop/impl/go/v0.31/Makefile b/transport-interop/impl/go/v0.31/Makefile similarity index 100% rename from multidim-interop/impl/go/v0.31/Makefile rename to transport-interop/impl/go/v0.31/Makefile diff --git a/multidim-interop/impl/go/v0.31/version.lock b/transport-interop/impl/go/v0.31/version.lock similarity index 100% rename from multidim-interop/impl/go/v0.31/version.lock rename to transport-interop/impl/go/v0.31/version.lock diff --git a/multidim-interop/impl/java/.gitignore b/transport-interop/impl/java/.gitignore similarity index 100% rename from multidim-interop/impl/java/.gitignore rename to transport-interop/impl/java/.gitignore diff --git a/multidim-interop/impl/java/v0.0.1/Makefile b/transport-interop/impl/java/v0.0.1/Makefile similarity index 100% rename from multidim-interop/impl/java/v0.0.1/Makefile rename to transport-interop/impl/java/v0.0.1/Makefile diff --git a/multidim-interop/impl/js/.gitignore b/transport-interop/impl/js/.gitignore similarity index 100% rename from multidim-interop/impl/js/.gitignore rename to transport-interop/impl/js/.gitignore diff --git a/multidim-interop/impl/js/v0.45/BrowserDockerfile b/transport-interop/impl/js/v0.45/BrowserDockerfile similarity index 100% rename from multidim-interop/impl/js/v0.45/BrowserDockerfile rename to transport-interop/impl/js/v0.45/BrowserDockerfile diff --git a/multidim-interop/impl/js/v0.45/Dockerfile b/transport-interop/impl/js/v0.45/Dockerfile similarity index 100% rename from multidim-interop/impl/js/v0.45/Dockerfile rename to transport-interop/impl/js/v0.45/Dockerfile diff --git a/multidim-interop/impl/js/v0.45/Makefile b/transport-interop/impl/js/v0.45/Makefile similarity index 100% rename from multidim-interop/impl/js/v0.45/Makefile rename to transport-interop/impl/js/v0.45/Makefile diff --git a/multidim-interop/impl/js/v0.46/BrowserDockerfile b/transport-interop/impl/js/v0.46/BrowserDockerfile similarity index 100% rename from multidim-interop/impl/js/v0.46/BrowserDockerfile rename to transport-interop/impl/js/v0.46/BrowserDockerfile diff --git a/multidim-interop/impl/js/v0.46/Dockerfile b/transport-interop/impl/js/v0.46/Dockerfile similarity index 100% rename from multidim-interop/impl/js/v0.46/Dockerfile rename to transport-interop/impl/js/v0.46/Dockerfile diff --git a/multidim-interop/impl/js/v0.46/Makefile b/transport-interop/impl/js/v0.46/Makefile similarity index 100% rename from multidim-interop/impl/js/v0.46/Makefile rename to transport-interop/impl/js/v0.46/Makefile diff --git a/multidim-interop/impl/js/v0.46/package-lock.json b/transport-interop/impl/js/v0.46/package-lock.json similarity index 100% rename from multidim-interop/impl/js/v0.46/package-lock.json rename to transport-interop/impl/js/v0.46/package-lock.json diff --git a/multidim-interop/impl/js/v0.46/package.json b/transport-interop/impl/js/v0.46/package.json similarity index 100% rename from multidim-interop/impl/js/v0.46/package.json rename to transport-interop/impl/js/v0.46/package.json diff --git a/multidim-interop/impl/nim/mainv1.nim b/transport-interop/impl/nim/mainv1.nim similarity index 100% rename from multidim-interop/impl/nim/mainv1.nim rename to transport-interop/impl/nim/mainv1.nim diff --git a/multidim-interop/impl/nim/v1.0/.gitignore b/transport-interop/impl/nim/v1.0/.gitignore similarity index 100% rename from multidim-interop/impl/nim/v1.0/.gitignore rename to transport-interop/impl/nim/v1.0/.gitignore diff --git a/multidim-interop/impl/nim/v1.0/Dockerfile b/transport-interop/impl/nim/v1.0/Dockerfile similarity index 100% rename from multidim-interop/impl/nim/v1.0/Dockerfile rename to transport-interop/impl/nim/v1.0/Dockerfile diff --git a/multidim-interop/impl/nim/v1.0/Makefile b/transport-interop/impl/nim/v1.0/Makefile similarity index 100% rename from multidim-interop/impl/nim/v1.0/Makefile rename to transport-interop/impl/nim/v1.0/Makefile diff --git a/multidim-interop/impl/rust-chromium/.gitignore b/transport-interop/impl/rust-chromium/.gitignore similarity index 100% rename from multidim-interop/impl/rust-chromium/.gitignore rename to transport-interop/impl/rust-chromium/.gitignore diff --git a/multidim-interop/impl/rust-chromium/v0.52/Makefile b/transport-interop/impl/rust-chromium/v0.52/Makefile similarity index 100% rename from multidim-interop/impl/rust-chromium/v0.52/Makefile rename to transport-interop/impl/rust-chromium/v0.52/Makefile diff --git a/multidim-interop/impl/rust/.gitignore b/transport-interop/impl/rust/.gitignore similarity index 100% rename from multidim-interop/impl/rust/.gitignore rename to transport-interop/impl/rust/.gitignore diff --git a/multidim-interop/impl/rust/v0.51/Makefile b/transport-interop/impl/rust/v0.51/Makefile similarity index 100% rename from multidim-interop/impl/rust/v0.51/Makefile rename to transport-interop/impl/rust/v0.51/Makefile diff --git a/multidim-interop/impl/rust/v0.52/Makefile b/transport-interop/impl/rust/v0.52/Makefile similarity index 100% rename from multidim-interop/impl/rust/v0.52/Makefile rename to transport-interop/impl/rust/v0.52/Makefile diff --git a/multidim-interop/impl/zig/.gitignore b/transport-interop/impl/zig/.gitignore similarity index 100% rename from multidim-interop/impl/zig/.gitignore rename to transport-interop/impl/zig/.gitignore diff --git a/multidim-interop/impl/zig/v0.0.1/Makefile b/transport-interop/impl/zig/v0.0.1/Makefile similarity index 100% rename from multidim-interop/impl/zig/v0.0.1/Makefile rename to transport-interop/impl/zig/v0.0.1/Makefile diff --git a/multidim-interop/package-lock.json b/transport-interop/package-lock.json similarity index 100% rename from multidim-interop/package-lock.json rename to transport-interop/package-lock.json diff --git a/multidim-interop/package.json b/transport-interop/package.json similarity index 100% rename from multidim-interop/package.json rename to transport-interop/package.json diff --git a/multidim-interop/renderResults.ts b/transport-interop/renderResults.ts similarity index 100% rename from multidim-interop/renderResults.ts rename to transport-interop/renderResults.ts diff --git a/multidim-interop/src/compose-runner.ts b/transport-interop/src/compose-runner.ts similarity index 100% rename from multidim-interop/src/compose-runner.ts rename to transport-interop/src/compose-runner.ts diff --git a/multidim-interop/src/compose-stdout-helper.ts b/transport-interop/src/compose-stdout-helper.ts similarity index 100% rename from multidim-interop/src/compose-stdout-helper.ts rename to transport-interop/src/compose-stdout-helper.ts diff --git a/multidim-interop/src/generator.ts b/transport-interop/src/generator.ts similarity index 100% rename from multidim-interop/src/generator.ts rename to transport-interop/src/generator.ts diff --git a/multidim-interop/src/lib.ts b/transport-interop/src/lib.ts similarity index 100% rename from multidim-interop/src/lib.ts rename to transport-interop/src/lib.ts diff --git a/multidim-interop/testplans.ts b/transport-interop/testplans.ts similarity index 100% rename from multidim-interop/testplans.ts rename to transport-interop/testplans.ts diff --git a/multidim-interop/tsconfig.json b/transport-interop/tsconfig.json similarity index 100% rename from multidim-interop/tsconfig.json rename to transport-interop/tsconfig.json diff --git a/multidim-interop/versions.ts b/transport-interop/versions.ts similarity index 100% rename from multidim-interop/versions.ts rename to transport-interop/versions.ts From b64f37f02683b10aa9d4c3d8201d01bde09b26cd Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 29 Sep 2023 10:30:39 +1000 Subject: [PATCH 3/5] Update all references to `multidim-interop` --- .../actions/run-interop-ping-test/action.yml | 4 +- .../run-transport-interop-test/action.yml | 145 ++++++++++++++++++ ...idim-interop.yml => transport-interop.yml} | 12 +- .github/workflows/update-badge.yml | 2 +- README.md | 2 +- transport-interop/README.md | 4 +- transport-interop/helpers/cache.ts | 10 +- .../impl/js/v0.46/BrowserDockerfile | 2 +- 8 files changed, 163 insertions(+), 18 deletions(-) create mode 100644 .github/actions/run-transport-interop-test/action.yml rename .github/workflows/{multidim-interop.yml => transport-interop.yml} (77%) diff --git a/.github/actions/run-interop-ping-test/action.yml b/.github/actions/run-interop-ping-test/action.yml index 1e56fb2b8..b351f1d17 100644 --- a/.github/actions/run-interop-ping-test/action.yml +++ b/.github/actions/run-interop-ping-test/action.yml @@ -43,9 +43,9 @@ runs: shell: bash # This depends on where this file is within this repository. This walks up - # from here to the multidim-interop folder + # from here to the transport-interop folder - run: | - WORK_DIR=$(realpath "$GITHUB_ACTION_PATH/../../../multidim-interop") + WORK_DIR=$(realpath "$GITHUB_ACTION_PATH/../../../transport-interop") echo "WORK_DIR=$WORK_DIR" >> $GITHUB_OUTPUT shell: bash id: find-workdir diff --git a/.github/actions/run-transport-interop-test/action.yml b/.github/actions/run-transport-interop-test/action.yml new file mode 100644 index 000000000..09eaaf33d --- /dev/null +++ b/.github/actions/run-transport-interop-test/action.yml @@ -0,0 +1,145 @@ +name: "libp2p transport interop test" +description: "Run the libp2p transport interoperability test suite" +inputs: + test-filter: + description: "Filter which tests to run out of the created matrix" + required: false + default: "" + test-ignore: + description: "Exclude tests from the created matrix that include this string in their name" + required: false + default: "" + extra-versions: + description: "Space-separated paths to JSON files describing additional images" + required: false + default: "" + s3-cache-bucket: + description: "Which S3 bucket to use for container layer caching" + required: false + default: "" + s3-access-key-id: + description: "S3 Access key id for the cache" + required: false + default: "" + s3-secret-access-key: + description: "S3 secret key id for the cache" + required: false + default: "" + aws-region: + description: "Which AWS region to use" + required: false + default: "us-east-1" + worker-count: + description: "How many workers to use for the test" + required: false + default: "2" +runs: + using: "composite" + steps: + - name: Configure AWS credentials for S3 build cache + if: inputs.s3-access-key-id != '' && inputs.s3-secret-access-key != '' + run: | + echo "PUSH_CACHE=true" >> $GITHUB_ENV + shell: bash + + # This depends on where this file is within this repository. This walks up + # from here to the transport-interop folder + - run: | + WORK_DIR=$(realpath "$GITHUB_ACTION_PATH/../../../transport-interop") + echo "WORK_DIR=$WORK_DIR" >> $GITHUB_OUTPUT + shell: bash + id: find-workdir + + - uses: actions/setup-node@v3 + with: + node-version: 18 + + # Existence of /etc/buildkit/buildkitd.toml indicates that this is a + # self-hosted runner. If so, we need to pass the config to the buildx + # action. The config enables docker.io proxy which is required to + # work around docker hub rate limiting. + - run: | + if test -f /etc/buildkit/buildkitd.toml; then + echo "config=/etc/buildkit/buildkitd.toml" >> $GITHUB_OUTPUT + fi + shell: bash + id: buildkit + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + with: + config: ${{ steps.buildkit.outputs.config }} + + - name: Install deps + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: npm ci + shell: bash + + - name: Load cache and build + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: npm run cache -- load + shell: bash + + - name: Assert Git tree is clean. + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + shell: bash + run: | + if [[ -n "$(git status --porcelain)" ]]; then + echo "Git tree is dirty. This means that building an impl generated something that should probably be .gitignore'd" + git status + exit 1 + fi + + - name: Push the image cache + if: env.PUSH_CACHE == 'true' + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + env: + AWS_BUCKET: ${{ inputs.s3-cache-bucket }} + AWS_REGION: ${{ inputs.aws-region }} + AWS_ACCESS_KEY_ID: ${{ inputs.s3-access-key-id }} + AWS_SECRET_ACCESS_KEY: ${{ inputs.s3-secret-access-key }} + run: npm run cache -- push + shell: bash + + - name: Run the test + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + env: + WORKER_COUNT: ${{ inputs.worker-count }} + EXTRA_VERSION: ${{ inputs.extra-versions }} + NAME_FILTER: ${{ inputs.test-filter }} + NAME_IGNORE: ${{ inputs.test-ignore }} + run: npm run test -- --extra-version=$EXTRA_VERSION --name-filter=$NAME_FILTER --name-ignore=$NAME_IGNORE + shell: bash + + - name: Print the results + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: cat results.csv + shell: bash + + - name: Render results + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: npm run renderResults > ./dashboard.md + shell: bash + + - name: Show Dashboard Output + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: cat ./dashboard.md >> $GITHUB_STEP_SUMMARY + shell: bash + + - name: Exit with Error + working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }} + run: | + if grep -q ":red_circle:" ./dashboard.md; then + exit 1 + else + exit 0 + fi + shell: bash + + - uses: actions/upload-artifact@v3 + with: + name: test-plans-output + path: | + ${{ steps.find-workdir.outputs.WORK_DIR }}/results.csv + ${{ steps.find-workdir.outputs.WORK_DIR }}/dashboard.md diff --git a/.github/workflows/multidim-interop.yml b/.github/workflows/transport-interop.yml similarity index 77% rename from .github/workflows/multidim-interop.yml rename to .github/workflows/transport-interop.yml index b3ca55b47..275ebb1bf 100644 --- a/.github/workflows/multidim-interop.yml +++ b/.github/workflows/transport-interop.yml @@ -2,21 +2,21 @@ on: workflow_dispatch: pull_request: paths: - - 'multidim-interop/**' + - 'transport-interop/**' push: branches: - "master" paths: - - 'multidim-interop/**' + - 'transport-interop/**' -name: libp2p multidimensional interop test +name: libp2p transport interop test jobs: - run-multidim-interop: + run-transport-interop: runs-on: ['self-hosted', 'linux', 'x64', '4xlarge'] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/run-interop-ping-test + - uses: ./.github/actions/run-transport-interop-test with: s3-cache-bucket: libp2p-by-tf-aws-bootstrap s3-access-key-id: ${{ vars.S3_AWS_ACCESS_KEY_ID }} @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v3 # Purposely not using secrets to replicate how forks will behave. - - uses: ./.github/actions/run-interop-ping-test + - uses: ./.github/actions/run-transport-interop-test with: # It's okay to not run the tests, we only care to check if the tests build without cache. test-filter: '"no test matches this, skip all"' diff --git a/.github/workflows/update-badge.yml b/.github/workflows/update-badge.yml index acecafb53..246160215 100644 --- a/.github/workflows/update-badge.yml +++ b/.github/workflows/update-badge.yml @@ -3,7 +3,7 @@ name: Update Badge on: workflow_run: workflows: - - libp2p multidimensional interop test + - libp2p transport interop test types: - completed branches: diff --git a/README.md b/README.md index e37c9f1de..54f737b40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Interoperability/end to end test-plans & performance benchmarking for libp2p -[![Interop Dashboard](https://github.com/libp2p/test-plans/workflows/libp2p%20multidimensional%20interop%20test/badge.svg?branch=master)](https://github.com/libp2p/test-plans/actions/runs/6190795509/attempts/1#summary-16807793452) +[![Interop Dashboard](https://github.com/libp2p/test-plans/workflows/libp2p%transport%20interop%20test/badge.svg?branch=master)](https://github.com/libp2p/test-plans/actions/runs/6190795509/attempts/1#summary-16807793452) [![Made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) diff --git a/transport-interop/README.md b/transport-interop/README.md index ac190c6b4..cb4944ce5 100644 --- a/transport-interop/README.md +++ b/transport-interop/README.md @@ -1,7 +1,7 @@ -# Interoperability test +# Transport Interoperability tests This tests that different libp2p implementations can communicate with each other -on each of their supported capabilities. +on each of their supported (transport) capabilities. Each version of libp2p is defined in `versions.ts`. There the version defines its capabilities along with the id of its container image. diff --git a/transport-interop/helpers/cache.ts b/transport-interop/helpers/cache.ts index de4820929..697e452fb 100755 --- a/transport-interop/helpers/cache.ts +++ b/transport-interop/helpers/cache.ts @@ -7,7 +7,7 @@ import * as path from 'path'; import * as child_process from 'child_process'; import ignore, { Ignore } from 'ignore' -const multidimInteropDir = path.join(scriptDir, '..') +const root = path.join(scriptDir, '..') const arch = child_process.execSync('docker info -f "{{.Architecture}}"').toString().trim(); enum Mode { @@ -28,13 +28,13 @@ switch (modeStr) { } (async () => { - for (const implFamily of fs.readdirSync(path.join(multidimInteropDir, 'impl'))) { + for (const implFamily of fs.readdirSync(path.join(root, 'impl'))) { const ig = ignore() - addGitignoreIfPresent(ig, path.join(multidimInteropDir, ".gitignore")) - addGitignoreIfPresent(ig, path.join(multidimInteropDir, "..", ".gitignore")) + addGitignoreIfPresent(ig, path.join(root, ".gitignore")) + addGitignoreIfPresent(ig, path.join(root, "..", ".gitignore")) - const implFamilyDir = path.join(multidimInteropDir, 'impl', implFamily) + const implFamilyDir = path.join(root, 'impl', implFamily) addGitignoreIfPresent(ig, path.join(implFamilyDir, ".gitignore")) for (const impl of fs.readdirSync(implFamilyDir)) { diff --git a/transport-interop/impl/js/v0.46/BrowserDockerfile b/transport-interop/impl/js/v0.46/BrowserDockerfile index 97ec24fcc..15e607c9e 100644 --- a/transport-interop/impl/js/v0.46/BrowserDockerfile +++ b/transport-interop/impl/js/v0.46/BrowserDockerfile @@ -10,7 +10,7 @@ FROM mcr.microsoft.com/playwright COPY --from=js-libp2p-base /app/ /app/ -WORKDIR /app/node_modules/@libp2p/multidim-interop +WORKDIR /app/node_modules/@libp2p/transport-interop # We install browsers here instead of the cached version so that we use the latest browsers at run time. # Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it. # By installing here, we avoid installing it at test time. From f5d3a4a8eb294d1395e9a3d7fcc354c168560d4b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 4 Oct 2023 13:13:55 +1100 Subject: [PATCH 4/5] Fix JS errors --- transport-interop/impl/js/v0.46/BrowserDockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-interop/impl/js/v0.46/BrowserDockerfile b/transport-interop/impl/js/v0.46/BrowserDockerfile index 15e607c9e..68a09bf8d 100644 --- a/transport-interop/impl/js/v0.46/BrowserDockerfile +++ b/transport-interop/impl/js/v0.46/BrowserDockerfile @@ -10,7 +10,7 @@ FROM mcr.microsoft.com/playwright COPY --from=js-libp2p-base /app/ /app/ -WORKDIR /app/node_modules/@libp2p/transport-interop +WORKDIR /app/node_modules/@libp2p/multidim-interop # FIXME: Package should be renamed: https://github.com/libp2p/test-plans/issues/306 # We install browsers here instead of the cached version so that we use the latest browsers at run time. # Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it. # By installing here, we avoid installing it at test time. From 897270c2b618c729a30fc6c572f997dce133ede4 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 5 Oct 2023 13:33:09 +1100 Subject: [PATCH 5/5] Remove TODO --- transport-interop/impl/js/v0.46/BrowserDockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-interop/impl/js/v0.46/BrowserDockerfile b/transport-interop/impl/js/v0.46/BrowserDockerfile index 68a09bf8d..97ec24fcc 100644 --- a/transport-interop/impl/js/v0.46/BrowserDockerfile +++ b/transport-interop/impl/js/v0.46/BrowserDockerfile @@ -10,7 +10,7 @@ FROM mcr.microsoft.com/playwright COPY --from=js-libp2p-base /app/ /app/ -WORKDIR /app/node_modules/@libp2p/multidim-interop # FIXME: Package should be renamed: https://github.com/libp2p/test-plans/issues/306 +WORKDIR /app/node_modules/@libp2p/multidim-interop # We install browsers here instead of the cached version so that we use the latest browsers at run time. # Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it. # By installing here, we avoid installing it at test time.