Skip to content

Commit

Permalink
Merge pull request #758 from libp2p/web3-bot/sync
Browse files Browse the repository at this point in the history
sync: update CI config files
  • Loading branch information
galargh authored Jan 14, 2022
2 parents cd05807 + dc316bb commit f821c69
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "RUNGOGENERATE=true" >> $GITHUB_ENV
fi
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@df71e5d0e0ed317ebf43e6e59cf919430fa4b8f2 # 2021.1.1 (v0.2.1)
run: go install honnef.co/go/tools/cmd/staticcheck@c8caa92bad8c27ae734c6725b8a04932d54a147b # 2021.1.2 (v0.2.2)
- name: Check that go.mod is tidy
uses: protocol/multiple-go-modules@v1.2
with:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,24 @@ jobs:
run: |
go version
go env
- name: Use msys2 on windows
if: ${{ matrix.os == 'windows' }}
shell: bash
# The executable for msys2 is also called bash.cmd
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells
# If we prepend its location to the PATH
# subsequent 'shell: bash' steps will use msys2 instead of gitbash
run: echo "C:/msys64/usr/bin" >> $GITHUB_PATH
- name: Run repo-specific setup
uses: ./.github/actions/go-test-setup
if: hashFiles('./.github/actions/go-test-setup') != ''
- name: Run tests
uses: protocol/multiple-go-modules@v1.2
with:
run: go test -v -coverprofile module-coverage.txt ./...
# Use -coverpkg=./..., so that we include cross-package coverage.
# If package ./A imports ./B, and ./A's tests also cover ./B,
# this means ./B's coverage will be significantly higher than 0%.
run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./...
- name: Run tests (32 bit)
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
uses: protocol/multiple-go-modules@v1.2
Expand All @@ -49,7 +60,7 @@ jobs:
shell: bash
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
- name: Upload coverage to Codecov
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
files: '${{ env.COVERAGES }}'
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}
1 change: 0 additions & 1 deletion .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ name: Release Checker
on:
pull_request:
paths: [ 'version.json' ]
branches: [ master ]

jobs:
release-check:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ name: Releaser
on:
push:
paths: [ 'version.json' ]
branches: [ master ]

jobs:
releaser:
Expand Down
14 changes: 14 additions & 0 deletions dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"math/rand"
"runtime"
"sort"
"strings"
"sync"
Expand Down Expand Up @@ -797,6 +798,9 @@ func TestPeriodicRefresh(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
if runtime.GOOS == "windows" {
t.Skip("skipping due to #760")
}
if detectrace.WithRace() {
t.Skip("skipping due to race detector max goroutines")
}
Expand Down Expand Up @@ -858,6 +862,9 @@ func TestPeriodicRefresh(t *testing.T) {
}

func TestProvidesMany(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("skipping due to #760")
}
if detectrace.WithRace() {
t.Skip("skipping due to race detector max goroutines")
}
Expand Down Expand Up @@ -1116,6 +1123,9 @@ func TestFindPeerWithQueryFilter(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
if runtime.GOOS == "windows" {
t.Skip("skipping due to #760")
}

ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Expand Down Expand Up @@ -1365,6 +1375,10 @@ func testFindPeerQuery(t *testing.T,
leafs, // Number of nodes that might be connected to from the bootstrappers
bootstrapConns int, // Number of bootstrappers each leaf should connect to.
) {
if runtime.GOOS == "windows" {
t.Skip("skipping due to #760")
}

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down

0 comments on commit f821c69

Please sign in to comment.