-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 1.58 KB
/
upstream.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
pull_request:
branches:
- master
push:
branches:
- master
name: Upstream Test
jobs:
unit:
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu'
go:
# - '1.15.x'
- '1.16.x'
upstream:
# - 'libp2p/go-libp2p-pubsub' flaky
# - 'ipfs/go-bitswap' flaky
# - 'libp2p/go-libp2p-kad-dht'
- 'libp2p/go-libp2p-daemon'
runs-on: ${{ matrix.os }}-latest
name: ${{ 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 ./...