Skip to content

Commit a40180c

Browse files
.github/: Introduce interop tests (#2835)
Adds two workflows on push & PR: * `run-ping-interop-cross-version`: runs a Testground interoperability test between multiple versions of rust-libp2p, including master, and the current branch (during a pull request) * `run-ping-interop-cross-implementation`: runs a Testground interoperability test between go-libp2p and rust-libp2p, and the current branch (during a pull request) We rely on the https://github.com/libp2p/test-plans/ repository to retrieve and run the tests. Co-authored-by: Piotr Galar <[email protected]>
1 parent b8c3b28 commit a40180c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/interop-test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
name: Interoperability Testing
7+
8+
jobs:
9+
# NOTE: during a pull request run, github creates a merge commit referenced in `github.sha`
10+
# that merge commit is not a regular commit. You won't find it with a regular `git checkout SHA` and
11+
# tools like `go get repo@SHA` won't find it.
12+
#
13+
# As a workaround, we generate a path to the actual pull request's commit, it looks like:
14+
# `github.com/external-org/go-libp2p@latest-commit-on-their-branch`
15+
run-ping-interop-cross-version:
16+
uses: "libp2p/test-plans/.github/workflows/run-composition.yml@master"
17+
with:
18+
composition_file: "ping/_compositions/rust-cross-versions.toml"
19+
custom_git_target: github.com/${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
20+
custom_git_reference: ${{ github.event.pull_request.head.sha || github.sha }}
21+
run-ping-interop-cross-implementation:
22+
uses: "libp2p/test-plans/.github/workflows/run-composition.yml@master"
23+
with:
24+
composition_file: "ping/_compositions/go-rust-interop-latest.toml"
25+
custom_git_target: github.com/${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
26+
custom_git_reference: ${{ github.event.pull_request.head.sha || github.sha }}
27+
custom_interop_target: rust

0 commit comments

Comments
 (0)