mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2026-01-09 19:58:17 -05:00
90 lines
3.3 KiB
YAML
90 lines
3.3 KiB
YAML
name: Interoperability Tests
|
|
|
|
on:
|
|
pull_request:
|
|
merge_group:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-transport-interop:
|
|
name: Run transport interoperability tests
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Free Disk Space
|
|
# For some reason we have space issues while running this action. Likely while building the image.
|
|
# This action will free up some space to avoid the issue.
|
|
uses: jlumbroso/free-disk-space@v1.3.1
|
|
with:
|
|
tool-cache: true
|
|
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build image
|
|
run: docker buildx build --load -t nim-libp2p-head -f interop/transport/Dockerfile .
|
|
- name: Run tests
|
|
uses: libp2p/test-plans/.github/actions/run-transport-interop-test@master
|
|
with:
|
|
test-filter: nim-libp2p-head
|
|
# without suffix action fails because "hole-punching-interop" artifacts have
|
|
# the same name as "transport-interop" artifacts
|
|
test-results-suffix: transport-interop
|
|
extra-versions: ${{ github.workspace }}/interop/transport/version.json
|
|
s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }}
|
|
s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}
|
|
s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }}
|
|
aws-region: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_REGION }}
|
|
|
|
# nim-libp2p#1367: hole punching tests are temporary disabled as they keep failing
|
|
# and issue does not seem to be on nim-libp2p side
|
|
# run-hole-punching-interop:
|
|
# name: Run hole-punching interoperability tests
|
|
# runs-on: ubuntu-22.04
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - uses: docker/setup-buildx-action@v3
|
|
# - name: Build image
|
|
# run: docker buildx build --load -t nim-libp2p-head -f interop/hole-punching/Dockerfile .
|
|
# - name: Run tests
|
|
# uses: libp2p/test-plans/.github/actions/run-interop-hole-punch-test@master
|
|
# with:
|
|
# test-filter: nim-libp2p-head
|
|
# extra-versions: ${{ github.workspace }}/interop/hole-punching/version.json
|
|
# s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }}
|
|
# s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}
|
|
# s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }}
|
|
# aws-region: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_REGION }}
|
|
run-autonatv2-interop:
|
|
name: Run AutoNATv2 interoperability tests
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.25"
|
|
|
|
- name: Set up Nim
|
|
uses: jiro4989/setup-nim-action@v1
|
|
with:
|
|
nim-version: "stable"
|
|
|
|
- name: Run Go and Nim together
|
|
run: |
|
|
nimble install
|
|
cd interop/autonatv2/go-peer
|
|
git clone https://github.com/libp2p/go-libp2p
|
|
cd go-libp2p
|
|
git apply ../disable-filtering-of-private-ip-addresses.patch
|
|
cd ..
|
|
go run testautonatv2.go &
|
|
cd ../nim-peer
|
|
nim r src/nim_peer.nim $(cat ../go-peer/peer.id)
|