Skip to content

Commit afe1385

Browse files
authored
Merge pull request #82 from libp2p/web3-bot/sync
sync: update CI config files
2 parents a4618e6 + 01e4df5 commit afe1385

File tree

6 files changed

+176
-168
lines changed

6 files changed

+176
-168
lines changed

.github/workflows/go-check.yml

+9-15
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,20 @@ jobs:
88
unit:
99
runs-on: ubuntu-latest
1010
name: All
11-
env:
12-
RUNGOGENERATE: false
1311
steps:
1412
- uses: actions/checkout@v3
1513
with:
1614
submodules: recursive
15+
- id: config
16+
uses: protocol/.github/.github/actions/read-config@master
1717
- uses: actions/setup-go@v3
1818
with:
19-
go-version: "1.19.x"
19+
go-version: 1.20.x
2020
- name: Run repo-specific setup
2121
uses: ./.github/actions/go-check-setup
2222
if: hashFiles('./.github/actions/go-check-setup') != ''
23-
- name: Read config
24-
if: hashFiles('./.github/workflows/go-check-config.json') != ''
25-
run: |
26-
if jq -re .gogenerate ./.github/workflows/go-check-config.json; then
27-
echo "RUNGOGENERATE=true" >> $GITHUB_ENV
28-
fi
2923
- name: Install staticcheck
30-
run: go install honnef.co/go/tools/cmd/staticcheck@376210a89477dedbe6fdc4484b233998650d7b3c # 2022.1.3 (v0.3.3)
24+
run: go install honnef.co/go/tools/cmd/staticcheck@4970552d932f48b71485287748246cf3237cebdf # 2023.1 (v0.4.0)
3125
- name: Check that go.mod is tidy
3226
uses: protocol/[email protected]
3327
with:
@@ -39,32 +33,32 @@ jobs:
3933
fi
4034
git diff --exit-code -- go.sum go.mod
4135
- name: gofmt
42-
if: ${{ success() || failure() }} # run this step even if the previous one failed
36+
if: success() || failure() # run this step even if the previous one failed
4337
run: |
4438
out=$(gofmt -s -l .)
4539
if [[ -n "$out" ]]; then
4640
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
4741
exit 1
4842
fi
4943
- name: go vet
50-
if: ${{ success() || failure() }} # run this step even if the previous one failed
44+
if: success() || failure() # run this step even if the previous one failed
5145
uses: protocol/[email protected]
5246
with:
5347
run: go vet ./...
5448
- name: staticcheck
55-
if: ${{ success() || failure() }} # run this step even if the previous one failed
49+
if: success() || failure() # run this step even if the previous one failed
5650
uses: protocol/[email protected]
5751
with:
5852
run: |
5953
set -o pipefail
6054
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
6155
- name: go generate
6256
uses: protocol/[email protected]
63-
if: (success() || failure()) && env.RUNGOGENERATE == 'true'
57+
if: (success() || failure()) && fromJSON(steps.config.outputs.json).gogenerate == true
6458
with:
6559
run: |
6660
git clean -fd # make sure there aren't untracked files / directories
67-
go generate ./...
61+
go generate -x ./...
6862
# check if go generate modified or added any files
6963
if ! $(git add . && git diff-index HEAD --exit-code --quiet); then
7064
echo "go generated caused changes to the repository:"

.github/workflows/go-test.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ "ubuntu", "windows", "macos" ]
13-
go: [ "1.18.x", "1.19.x" ]
13+
go: ["1.19.x","1.20.x"]
1414
env:
1515
COVERAGES: ""
16-
runs-on: ${{ format('{0}-latest', matrix.os) }}
16+
runs-on: ${{ fromJSON(vars[format('UCI_GO_TEST_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }}
1717
name: ${{ matrix.os }} (go ${{ matrix.go }})
1818
steps:
1919
- uses: actions/checkout@v3
2020
with:
2121
submodules: recursive
22+
- id: config
23+
uses: protocol/.github/.github/actions/read-config@master
2224
- uses: actions/setup-go@v3
2325
with:
2426
go-version: ${{ matrix.go }}
@@ -27,7 +29,7 @@ jobs:
2729
go version
2830
go env
2931
- name: Use msys2 on windows
30-
if: ${{ matrix.os == 'windows' }}
32+
if: matrix.os == 'windows'
3133
shell: bash
3234
# The executable for msys2 is also called bash.cmd
3335
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells
@@ -38,31 +40,37 @@ jobs:
3840
uses: ./.github/actions/go-test-setup
3941
if: hashFiles('./.github/actions/go-test-setup') != ''
4042
- name: Run tests
43+
if: contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
4144
uses: protocol/[email protected]
4245
with:
4346
# Use -coverpkg=./..., so that we include cross-package coverage.
4447
# If package ./A imports ./B, and ./A's tests also cover ./B,
4548
# this means ./B's coverage will be significantly higher than 0%.
4649
run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./...
4750
- name: Run tests (32 bit)
48-
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
51+
# can't run 32 bit tests on OSX.
52+
if: matrix.os != 'macos' &&
53+
fromJSON(steps.config.outputs.json).skip32bit != true &&
54+
contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
4955
uses: protocol/[email protected]
5056
env:
5157
GOARCH: 386
5258
with:
5359
run: |
54-
export "PATH=${{ env.PATH_386 }}:$PATH"
60+
export "PATH=$PATH_386:$PATH"
5561
go test -v -shuffle=on ./...
5662
- name: Run tests with race detector
57-
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
63+
# speed things up. Windows and OSX VMs are slow
64+
if: matrix.os == 'ubuntu' &&
65+
contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
5866
uses: protocol/[email protected]
5967
with:
6068
run: go test -v -race ./...
6169
- name: Collect coverage files
6270
shell: bash
6371
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
6472
- name: Upload coverage to Codecov
65-
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
73+
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
6674
with:
6775
files: '${{ env.COVERAGES }}'
6876
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

.github/workflows/release-check.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33

44
name: Release Checker
55
on:
6-
pull_request:
6+
pull_request_target:
77
paths: [ 'version.json' ]
88

99
jobs:
1010
release-check:
1111
uses: protocol/.github/.github/workflows/release-check.yml@master
12+
with:
13+
go-version: 1.20.x

go.mod

+39-40
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,95 @@
11
module github.com/libp2p/go-libp2p-http
22

3-
go 1.18
3+
go 1.19
44

55
require (
6-
github.com/libp2p/go-libp2p v0.22.0
7-
github.com/libp2p/go-libp2p-gostream v0.5.0
8-
github.com/multiformats/go-multiaddr v0.6.0
6+
github.com/libp2p/go-libp2p v0.26.0
7+
github.com/libp2p/go-libp2p-gostream v0.6.0
8+
github.com/multiformats/go-multiaddr v0.8.0
99
)
1010

1111
require (
1212
github.com/benbjohnson/clock v1.3.0 // indirect
1313
github.com/beorn7/perks v1.0.1 // indirect
14-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
15-
github.com/cheekybits/genny v1.0.0 // indirect
14+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1615
github.com/containerd/cgroups v1.0.4 // indirect
17-
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
16+
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
1817
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
1918
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
20-
github.com/docker/go-units v0.4.0 // indirect
19+
github.com/docker/go-units v0.5.0 // indirect
2120
github.com/elastic/gosigar v0.14.2 // indirect
2221
github.com/flynn/noise v1.0.0 // indirect
2322
github.com/francoispqt/gojay v1.2.13 // indirect
24-
github.com/fsnotify/fsnotify v1.5.4 // indirect
2523
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
2624
github.com/godbus/dbus/v5 v5.1.0 // indirect
2725
github.com/gogo/protobuf v1.3.2 // indirect
26+
github.com/golang/mock v1.6.0 // indirect
2827
github.com/golang/protobuf v1.5.2 // indirect
2928
github.com/google/gopacket v1.1.19 // indirect
30-
github.com/gorilla/websocket v1.5.0 // indirect
29+
github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect
3130
github.com/huin/goupnp v1.0.3 // indirect
32-
github.com/ipfs/go-cid v0.2.0 // indirect
31+
github.com/ipfs/go-cid v0.3.2 // indirect
3332
github.com/ipfs/go-log/v2 v2.5.1 // indirect
3433
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
3534
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
36-
github.com/klauspost/compress v1.15.1 // indirect
37-
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
35+
github.com/klauspost/compress v1.15.12 // indirect
36+
github.com/klauspost/cpuid/v2 v2.2.1 // indirect
3837
github.com/koron/go-ssdp v0.0.3 // indirect
3938
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
4039
github.com/libp2p/go-cidranger v1.1.0 // indirect
4140
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
4241
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
43-
github.com/libp2p/go-msgio v0.2.0 // indirect
42+
github.com/libp2p/go-msgio v0.3.0 // indirect
4443
github.com/libp2p/go-nat v0.1.0 // indirect
45-
github.com/libp2p/go-netroute v0.2.0 // indirect
46-
github.com/libp2p/go-openssl v0.1.0 // indirect
44+
github.com/libp2p/go-netroute v0.2.1 // indirect
4745
github.com/libp2p/go-reuseport v0.2.0 // indirect
48-
github.com/libp2p/go-yamux/v3 v3.1.2 // indirect
49-
github.com/lucas-clemente/quic-go v0.28.1 // indirect
50-
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
51-
github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect
52-
github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
53-
github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect
46+
github.com/libp2p/go-yamux/v4 v4.0.0 // indirect
5447
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
5548
github.com/mattn/go-isatty v0.0.16 // indirect
56-
github.com/mattn/go-pointer v0.0.1 // indirect
57-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
49+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
5850
github.com/miekg/dns v1.1.50 // indirect
5951
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
6052
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
6153
github.com/minio/sha256-simd v1.0.0 // indirect
6254
github.com/mr-tron/base58 v1.2.0 // indirect
63-
github.com/multiformats/go-base32 v0.0.4 // indirect
64-
github.com/multiformats/go-base36 v0.1.0 // indirect
55+
github.com/multiformats/go-base32 v0.1.0 // indirect
56+
github.com/multiformats/go-base36 v0.2.0 // indirect
6557
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
6658
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
6759
github.com/multiformats/go-multibase v0.1.1 // indirect
68-
github.com/multiformats/go-multicodec v0.5.0 // indirect
60+
github.com/multiformats/go-multicodec v0.7.0 // indirect
6961
github.com/multiformats/go-multihash v0.2.1 // indirect
70-
github.com/multiformats/go-multistream v0.3.3 // indirect
71-
github.com/multiformats/go-varint v0.0.6 // indirect
72-
github.com/nxadm/tail v1.4.8 // indirect
73-
github.com/onsi/ginkgo v1.16.5 // indirect
62+
github.com/multiformats/go-multistream v0.4.1 // indirect
63+
github.com/multiformats/go-varint v0.0.7 // indirect
64+
github.com/onsi/ginkgo/v2 v2.5.1 // indirect
7465
github.com/opencontainers/runtime-spec v1.0.2 // indirect
7566
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
7667
github.com/pkg/errors v0.9.1 // indirect
77-
github.com/prometheus/client_golang v1.12.1 // indirect
78-
github.com/prometheus/client_model v0.2.0 // indirect
68+
github.com/prometheus/client_golang v1.14.0 // indirect
69+
github.com/prometheus/client_model v0.3.0 // indirect
7970
github.com/prometheus/common v0.37.0 // indirect
8071
github.com/prometheus/procfs v0.8.0 // indirect
72+
github.com/quic-go/qpack v0.4.0 // indirect
73+
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
74+
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
75+
github.com/quic-go/quic-go v0.33.0 // indirect
76+
github.com/quic-go/webtransport-go v0.5.1 // indirect
8177
github.com/raulk/go-watchdog v1.3.0 // indirect
82-
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
8378
github.com/spaolacci/murmur3 v1.1.0 // indirect
8479
go.uber.org/atomic v1.10.0 // indirect
80+
go.uber.org/dig v1.15.0 // indirect
81+
go.uber.org/fx v1.18.2 // indirect
8582
go.uber.org/multierr v1.8.0 // indirect
86-
go.uber.org/zap v1.22.0 // indirect
87-
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
88-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
83+
go.uber.org/zap v1.24.0 // indirect
84+
golang.org/x/crypto v0.4.0 // indirect
85+
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
86+
golang.org/x/mod v0.7.0 // indirect
8987
golang.org/x/net v0.7.0 // indirect
90-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
88+
golang.org/x/sync v0.1.0 // indirect
9189
golang.org/x/sys v0.5.0 // indirect
92-
golang.org/x/tools v0.1.12 // indirect
90+
golang.org/x/text v0.7.0 // indirect
91+
golang.org/x/tools v0.3.0 // indirect
9392
google.golang.org/protobuf v1.28.1 // indirect
94-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
9593
lukechampine.com/blake3 v1.1.7 // indirect
94+
nhooyr.io/websocket v1.8.7 // indirect
9695
)

0 commit comments

Comments
 (0)