mirror of https://github.com/libp2p/go-libp2p.git
Browse Source
Add tests to link in new libp2p release in upstream repos and interop tests. This way, we'll very quickly know if something is broken.pull/1081/head
Steven Allen
4 years ago
2 changed files with 92 additions and 0 deletions
@ -0,0 +1,40 @@ |
|||
on: [push, pull_request] |
|||
|
|||
jobs: |
|||
unit: |
|||
runs-on: ubuntu-latest |
|||
name: Js/Go Interop tests |
|||
steps: |
|||
- uses: actions/setup-go@v2 |
|||
with: |
|||
go-version: "1.16.x" |
|||
- name: Go information |
|||
run: | |
|||
go version |
|||
go env |
|||
- uses: actions/checkout@v2 |
|||
with: |
|||
path: 'libp2p' |
|||
- uses: actions/checkout@v2 |
|||
with: |
|||
repository: 'libp2p/go-libp2p-daemon' |
|||
path: 'daemon' |
|||
- uses: actions/checkout@v2 |
|||
with: |
|||
repository: 'libp2p/interop' |
|||
path: 'interop' |
|||
- name: Mod replace go-libp2p in go-libp2p-daemon |
|||
working-directory: daemon |
|||
run: | |
|||
go mod edit -replace "github.com/libp2p/go-libp2p=../libp2p" |
|||
go mod tidy |
|||
- name: Build libp2p daemon |
|||
working-directory: daemon |
|||
run: | |
|||
go build -o daemon ./p2pd |
|||
- name: Setup interop tests |
|||
working-directory: interop |
|||
run: npm install |
|||
- name: Run interop tests |
|||
working-directory: interop |
|||
run: LIBP2P_GO_BIN="$(pwd)/../daemon/daemon" npm run test |
@ -0,0 +1,52 @@ |
|||
on: [push, pull_request] |
|||
|
|||
jobs: |
|||
unit: |
|||
strategy: |
|||
fail-fast: false |
|||
matrix: |
|||
os: |
|||
- 'ubuntu' |
|||
go: |
|||
# - '1.15.x' |
|||
- '1.16.x' |
|||
upstream: |
|||
- 'libp2p/go-libp2p-pubsub' |
|||
- 'libp2p/go-libp2p-daemon' |
|||
- 'libp2p/go-libp2p-kad-dht' |
|||
- 'ipfs/go-bitswap' |
|||
runs-on: ${{ matrix.os }}-latest |
|||
name: Upstream ${{ matrix.upstream }} unit tests (${{ matrix.os }}, Go ${{ matrix.go }}) |
|||
steps: |
|||
- uses: actions/setup-go@v2 |
|||
with: |
|||
go-version: ${{ matrix.go }} |
|||
- name: Go information |
|||
run: | |
|||
go version |
|||
go env |
|||
- uses: actions/checkout@v2 |
|||
with: |
|||
path: 'libp2p' |
|||
- uses: actions/checkout@v2 |
|||
with: |
|||
repository: ${{ matrix.upstream }} |
|||
path: upstream |
|||
- name: Patch in new go-libp2p |
|||
working-directory: upstream |
|||
run: | |
|||
go mod edit -replace "github.com/libp2p/go-libp2p=../libp2p" |
|||
go mod tidy |
|||
- name: Run tests |
|||
working-directory: upstream |
|||
run: go test -v ./... |
|||
- name: Run tests (32 bit) |
|||
working-directory: upstream |
|||
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. |
|||
env: |
|||
GOARCH: 386 |
|||
run: go test -v ./... |
|||
- name: Run tests with race detector |
|||
working-directory: upstream |
|||
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow |
|||
run: go test -v -race ./... |
Loading…
Reference in new issue