mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-28 02:01:20 +00:00
feat(ci): use interop-tests action instead of workflow (#3414)
This commit is contained in:
parent
53e477d442
commit
696c644fef
28
.github/workflows/interop-test.yml
vendored
28
.github/workflows/interop-test.yml
vendored
@ -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
|
||||
|
@ -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 <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`
|
||||
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 <path to >/libp2p/test-plans/multidim-interop/ && make)`.
|
||||
1. 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")
|
||||
|
18
interop-tests/ping-version.json
Normal file
18
interop-tests/ping-version.json
Normal 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"
|
||||
]
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "rust-libp2p-head",
|
||||
"containerImageID": "rust-libp2p-head",
|
||||
"transports": [
|
||||
"ws",
|
||||
"tcp",
|
||||
"quic-v1",
|
||||
"webrtc"
|
||||
],
|
||||
"secureChannels": [
|
||||
"tls",
|
||||
"noise"
|
||||
],
|
||||
"muxers": [
|
||||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user