diff --git a/.github/workflows/interop-test.yml b/.github/workflows/interop-test.yml index b4110059..8a5cf9b9 100644 --- a/.github/workflows/interop-test.yml +++ b/.github/workflows/interop-test.yml @@ -10,13 +10,11 @@ concurrency: cancel-in-progress: true jobs: - build-ping-container: - name: Build Ping interop container + run-multidim-interop: + name: Run multidimensional interoperability tests runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - with: - submodules: recursive - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: shared-key: interop-tests @@ -27,23 +25,7 @@ jobs: run: | cargo build --release -p interop-tests docker build -t rust-libp2p-head --build-arg=TEST_BINARY=target/release/ping . -f interop-tests/Dockerfile - docker image save -o ./interop-tests/ping-image.tar rust-libp2p-head - - name: Upload ping versions info - uses: actions/upload-artifact@v3 + - uses: libp2p/test-plans/.github/actions/run-interop-ping-test@c9130e425d266e5b222636d61348c0f8d6b978e4 with: - name: ping-versions - path: ./interop-tests/ping-versions.json - - name: Upload image tar - uses: actions/upload-artifact@v3 - with: - name: ping-image - path: ./interop-tests/ping-image.tar - run-multidim-interop: - name: Run multidimensional interoperability tests - needs: build-ping-container - uses: "libp2p/test-plans/.github/workflows/run-testplans.yml@master" - with: - dir: "multidim-interop" - extra-versions: ping-versions - image-tar: ping-image - test-filter: "rust-libp2p-head" + test-filter: rust-libp2p-head + extra-versions: ${{ github.workspace }}/interop-tests/ping-version.json diff --git a/interop-tests/README.md b/interop-tests/README.md index 35bb8c70..5327ca05 100644 --- a/interop-tests/README.md +++ b/interop-tests/README.md @@ -23,12 +23,12 @@ of these nodes with the other version's interop test. To run this test against all released libp2p versions you'll need to have the (libp2p/test-plans)[https://github.com/libp2p/test-plans] checked out. Then do -the following: +the following (from the root directory of this repository): -1. Build the image: `make`. -2. Build the images for all released versions in `libp2p/test-plans`: `(cd /libp2p/test-plans/multidim-interop/ && make)`. -3. Make a folder for the specified extra versions: `mkdir extra-versions && mv ping-versions.json extra-versions` -4. Run the test: +1. Build the ping binary: `cargo build --release -p interop-tests` +1. Build the image: `docker build -t rust-libp2p-head --build-arg=TEST_BINARY=target/release/ping . -f interop-tests/Dockerfile`. +1. Build the images for all released versions in `libp2p/test-plans`: `(cd /libp2p/test-plans/multidim-interop/ && make)`. +1. Run the test: +``` +RUST_LIBP2P="$PWD"; (cd /libp2p/test-plans/multidim-interop/ && npm run test -- --extra-version=$RUST_LIBP2P/interop-tests/ping-version.json --name-filter="rust-libp2p-head") ``` -RUST_LIBP2P_TEST_PLANS="$PWD"; (cd /libp2p/test-plans/multidim-interop/ && npm run test -- --extra-versions-dir=$RUST_LIBP2P_TEST_PLANS/extra-versions --name-filter="rust-libp2p-head") diff --git a/interop-tests/ping-version.json b/interop-tests/ping-version.json new file mode 100644 index 00000000..07228ff8 --- /dev/null +++ b/interop-tests/ping-version.json @@ -0,0 +1,18 @@ +{ + "id": "rust-libp2p-head", + "containerImageID": "rust-libp2p-head", + "transports": [ + "ws", + "tcp", + "quic-v1", + "webrtc" + ], + "secureChannels": [ + "tls", + "noise" + ], + "muxers": [ + "mplex", + "yamux" + ] +} diff --git a/interop-tests/ping-versions.json b/interop-tests/ping-versions.json deleted file mode 100644 index 5a09b924..00000000 --- a/interop-tests/ping-versions.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "id": "rust-libp2p-head", - "containerImageID": "rust-libp2p-head", - "transports": [ - "ws", - "tcp", - "quic-v1", - "webrtc" - ], - "secureChannels": [ - "tls", - "noise" - ], - "muxers": [ - "mplex", - "yamux" - ] - } -]