-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: run go mod tidy (and set Go 1.15) and gofmt -s in copy workflow (…
…#59)
- Loading branch information
Showing
4 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# File managed by web3-bot. DO NOT EDIT. | ||
# See https://github.com/protocol/.github/ for details. | ||
|
||
# Allow PRs opened by web3-bot to be rebased by commenting "@web3-bot rebase" on the PR. | ||
|
||
on: | ||
issue_comment: | ||
types: [ created ] | ||
|
||
name: Automatic Rebase | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: github.event.issue.pull_request != '' && github.event.issue.user.login == 'web3-bot' && contains(github.event.comment.body, '@web3-bot rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.WEB3BOT_GITHUB_TOKEN }} | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@7cea12ac34ab078fa37e87798d8986185afa7bf2 # v1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WEB3BOT_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# File managed by web3-bot. DO NOT EDIT. | ||
# See https://github.com/protocol/.github/ for details. | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
name: Go checks | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.16.x" | ||
- name: Install staticcheck | ||
run: go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2 | ||
- name: Check that go.mod is tidy | ||
run: | | ||
cp go.mod go.mod.orig | ||
cp go.sum go.sum.orig | ||
go mod tidy | ||
diff go.mod go.mod.orig | ||
diff go.sum go.sum.orig | ||
- name: go vet | ||
if: ${{ success() || failure() }} # run this step even if the previous one failed | ||
run: go vet ./... | ||
- name: staticcheck | ||
if: ${{ success() || failure() }} # run this step even if the previous one failed | ||
run: | | ||
set -o pipefail | ||
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# File managed by web3-bot. DO NOT EDIT. | ||
# See https://github.com/protocol/.github/ for details. | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
unit: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ "ubuntu", "windows", "macos" ] | ||
go: [ "1.15.x", "1.16.x" ] | ||
runs-on: ${{ matrix.os }}-latest | ||
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Go information | ||
run: | | ||
go version | ||
go env | ||
- name: Run tests | ||
run: go test -v -coverprofile coverage.txt ./... | ||
- name: Run tests (32 bit) | ||
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 | ||
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow | ||
run: go test -v -race ./... | ||
- name: Check if codecov.yml exists # only upload to Codecov if there's a codecov.yml | ||
id: check_codecov | ||
uses: andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673 # v1.0.1 | ||
with: | ||
files: "codecov.yml" | ||
- name: Upload coverage to Codecov | ||
if: steps.check_codecov.outputs.files_exists == 'true' | ||
uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1 | ||
with: | ||
file: coverage.txt | ||
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/multiformats/go-multistream | ||
|
||
go 1.12 | ||
go 1.15 | ||
|
||
require github.com/multiformats/go-varint v0.0.6 |