File tree 4 files changed +107
-1
lines changed
4 files changed +107
-1
lines changed Original file line number Diff line number Diff line change
1
+ # File managed by web3-bot. DO NOT EDIT.
2
+ # See https://github.com/protocol/.github/ for details.
3
+
4
+ # Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
5
+ # This reduces the friction associated with updating with our workflows.
6
+
7
+ on : [ pull_request ]
8
+
9
+ jobs :
10
+ automerge :
11
+ if : github.event.pull_request.user.login == 'web3-bot'
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Wait on tests
15
+ uses : lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
16
+ with :
17
+ ref : ${{ github.event.pull_request.head.sha }}
18
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
19
+ wait-interval : 10
20
+ running-workflow-name : ' automerge' # the name of this job
21
+ - name : Merge PR
22
+ uses : pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
23
+ env :
24
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
25
+ MERGE_LABELS : " "
26
+ MERGE_METHOD : " squash"
27
+ MERGE_DELETE_BRANCH : true
Original file line number Diff line number Diff line change
1
+ # File managed by web3-bot. DO NOT EDIT.
2
+ # See https://github.com/protocol/.github/ for details.
3
+
4
+ on : [push, pull_request]
5
+
6
+ jobs :
7
+ unit :
8
+ runs-on : ubuntu-latest
9
+ name : Go checks
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - uses : actions/setup-go@v2
13
+ with :
14
+ go-version : " 1.16.x"
15
+ - name : Install staticcheck
16
+ run : go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2
17
+ - name : Check that go.mod is tidy
18
+ run : |
19
+ go mod tidy
20
+ if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
21
+ echo "go.sum was added by go mod tidy"
22
+ exit 1
23
+ fi
24
+ git diff --exit-code -- go.sum go.mod
25
+ - name : gofmt
26
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
27
+ run : |
28
+ out=$(gofmt -s -l .)
29
+ if [[ -n "$out" ]]; then
30
+ echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
31
+ exit 1
32
+ fi
33
+ - name : go vet
34
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
35
+ run : go vet ./...
36
+ - name : staticcheck
37
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
38
+ run : |
39
+ set -o pipefail
40
+ staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
41
+
Original file line number Diff line number Diff line change
1
+ # File managed by web3-bot. DO NOT EDIT.
2
+ # See https://github.com/protocol/.github/ for details.
3
+
4
+ on : [push, pull_request]
5
+
6
+ jobs :
7
+ unit :
8
+ strategy :
9
+ fail-fast : false
10
+ matrix :
11
+ os : [ "ubuntu", "windows", "macos" ]
12
+ go : [ "1.15.x", "1.16.x" ]
13
+ runs-on : ${{ matrix.os }}-latest
14
+ name : Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
15
+ steps :
16
+ - uses : actions/checkout@v2
17
+ - uses : actions/setup-go@v2
18
+ with :
19
+ go-version : ${{ matrix.go }}
20
+ - name : Go information
21
+ run : |
22
+ go version
23
+ go env
24
+ - name : Run tests
25
+ run : go test -v -coverprofile coverage.txt ./...
26
+ - name : Run tests (32 bit)
27
+ if : ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
28
+ env :
29
+ GOARCH : 386
30
+ run : go test -v ./...
31
+ - name : Run tests with race detector
32
+ if : ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
33
+ run : go test -v -race ./...
34
+ - name : Upload coverage to Codecov
35
+ uses : codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 # v1.4.1
36
+ with :
37
+ file : coverage.txt
38
+ env_vars : OS=${{ matrix.os }}, GO=${{ matrix.go }}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
13
13
)
14
14
15
15
type Resolver struct {
16
- mx sync.Mutex
16
+ mx sync.Mutex
17
17
url string
18
18
19
19
// RR cache
You can’t perform that action at this time.
0 commit comments