-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
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,38 @@ | ||
# 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: Upload coverage to Codecov | ||
uses: codecov/codecov-action@fcebab03f26c7530a22baa63f06b3e0515f0c7cd # v1.3.1 | ||
with: | ||
file: coverage.txt | ||
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} |