Commit bca88094 authored by web3-bot's avatar web3-bot

update .github/workflows/go-test.yml

parent a06433f5
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# See https://github.com/protocol/.github/ for details. # See https://github.com/protocol/.github/ for details.
on: [push, pull_request] on: [push, pull_request]
name: Go Test
jobs: jobs:
unit: unit:
...@@ -11,9 +12,11 @@ jobs: ...@@ -11,9 +12,11 @@ jobs:
os: [ "ubuntu", "windows", "macos" ] os: [ "ubuntu", "windows", "macos" ]
go: [ "1.15.x", "1.16.x" ] go: [ "1.15.x", "1.16.x" ]
runs-on: ${{ matrix.os }}-latest runs-on: ${{ matrix.os }}-latest
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) name: ${{ matrix.os}} (go ${{ matrix.go }})
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
...@@ -22,17 +25,23 @@ jobs: ...@@ -22,17 +25,23 @@ jobs:
go version go version
go env go env
- name: Run tests - name: Run tests
run: go test -v -coverprofile coverage.txt ./... uses: protocol/multiple-go-modules@v1.0
with:
run: go test -v -coverprofile coverage.txt ./...
- name: Run tests (32 bit) - name: Run tests (32 bit)
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
uses: protocol/multiple-go-modules@v1.0
env: env:
GOARCH: 386 GOARCH: 386
run: go test -v ./... with:
run: go test -v ./...
- name: Run tests with race detector - name: Run tests with race detector
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
run: go test -v -race ./... uses: protocol/multiple-go-modules@v1.0
with:
run: go test -v -race ./...
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 # v1.4.1 uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 # v1.5.0
with: with:
file: coverage.txt file: coverage.txt
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment