feat(ci): use interop-tests action instead of workflow (#3414)

This commit is contained in:
Thomas Eizinger 2023-02-06 13:48:53 +13:00 committed by GitHub
parent 53e477d442
commit 696c644fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 50 deletions

View File

@ -10,13 +10,11 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build-ping-container: run-multidim-interop:
name: Build Ping interop container name: Run multidimensional interoperability tests
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
submodules: recursive
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with: with:
shared-key: interop-tests shared-key: interop-tests
@ -27,23 +25,7 @@ jobs:
run: | run: |
cargo build --release -p interop-tests cargo build --release -p interop-tests
docker build -t rust-libp2p-head --build-arg=TEST_BINARY=target/release/ping . -f interop-tests/Dockerfile 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 - uses: libp2p/test-plans/.github/actions/run-interop-ping-test@c9130e425d266e5b222636d61348c0f8d6b978e4
- name: Upload ping versions info
uses: actions/upload-artifact@v3
with: with:
name: ping-versions test-filter: rust-libp2p-head
path: ./interop-tests/ping-versions.json extra-versions: ${{ github.workspace }}/interop-tests/ping-version.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"

View File

@ -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 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 (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`. 1. Build the ping binary: `cargo build --release -p interop-tests`
2. Build the images for all released versions in `libp2p/test-plans`: `(cd <path 1. Build the image: `docker build -t rust-libp2p-head --build-arg=TEST_BINARY=target/release/ping . -f interop-tests/Dockerfile`.
to >/libp2p/test-plans/multidim-interop/ && make)`. 1. Build the images for all released versions in `libp2p/test-plans`: `(cd <path to >/libp2p/test-plans/multidim-interop/ && make)`.
3. Make a folder for the specified extra versions: `mkdir extra-versions && mv ping-versions.json extra-versions` 1. Run the test:
4. Run the test: ```
RUST_LIBP2P="$PWD"; (cd <path to >/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 <path to >/libp2p/test-plans/multidim-interop/ && npm run test -- --extra-versions-dir=$RUST_LIBP2P_TEST_PLANS/extra-versions --name-filter="rust-libp2p-head")

View File

@ -0,0 +1,18 @@
{
"id": "rust-libp2p-head",
"containerImageID": "rust-libp2p-head",
"transports": [
"ws",
"tcp",
"quic-v1",
"webrtc"
],
"secureChannels": [
"tls",
"noise"
],
"muxers": [
"mplex",
"yamux"
]
}

View File

@ -1,20 +0,0 @@
[
{
"id": "rust-libp2p-head",
"containerImageID": "rust-libp2p-head",
"transports": [
"ws",
"tcp",
"quic-v1",
"webrtc"
],
"secureChannels": [
"tls",
"noise"
],
"muxers": [
"mplex",
"yamux"
]
}
]