File tree Expand file tree Collapse file tree 3 files changed +101
-0
lines changed Expand file tree Collapse file tree 3 files changed +101
-0
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
+ # Allow PRs opened by web3-bot to be rebased by commenting "@web3-bot rebase" on the PR.
5
+
6
+ on :
7
+ issue_comment :
8
+ types : [ created ]
9
+
10
+ name : Automatic Rebase
11
+ jobs :
12
+ rebase :
13
+ name : Rebase
14
+ if : github.event.issue.pull_request != '' && github.event.issue.user.login == 'web3-bot' && contains(github.event.comment.body, '@web3-bot rebase')
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout the latest code
18
+ uses : actions/checkout@v2
19
+ with :
20
+ fetch-depth : 0
21
+ token : ${{ secrets.WEB3BOT_GITHUB_TOKEN }}
22
+ - name : Automatic Rebase
23
+ uses : cirrus-actions/rebase@7cea12ac34ab078fa37e87798d8986185afa7bf2 # v1.4
24
+ env :
25
+ GITHUB_TOKEN : ${{ secrets.WEB3BOT_GITHUB_TOKEN }}
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
+ cp go.mod go.mod.orig
20
+ cp go.sum go.sum.orig
21
+ go mod tidy
22
+ diff go.mod go.mod.orig
23
+ diff go.sum go.sum.orig
24
+ - name : go vet
25
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
26
+ run : go vet ./...
27
+ - name : staticcheck
28
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
29
+ run : |
30
+ set -o pipefail
31
+ staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
32
+
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 : Check if codecov.yml exists # only upload to Codecov if there's a codecov.yml
35
+ id : check_codecov
36
+ uses : andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673 # v1.0.1
37
+ with :
38
+ files : " codecov.yml"
39
+ - name : Upload coverage to Codecov
40
+ if : steps.check_codecov.outputs.files_exists == 'true'
41
+ uses : codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
42
+ with :
43
+ file : coverage.txt
44
+ env_vars : OS=${{ matrix.os }}, GO=${{ matrix.go }}
You can’t perform that action at this time.
0 commit comments