mirror of
https://github.com/status-im/go-libp2p-webrtc-direct.git
synced 2025-01-19 02:01:35 +00:00
add .github/workflows/go-test.yml
This commit is contained in:
parent
0967b8c145
commit
23c0c27067
38
.github/workflows/go-test.yml
vendored
Normal file
38
.github/workflows/go-test.yml
vendored
Normal file
@ -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@967e2b38a85a62bd61be5529ada27ebc109948c2 # v1.4.1
|
||||
with:
|
||||
file: coverage.txt
|
||||
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}
|
Loading…
x
Reference in New Issue
Block a user