add github workflow for unit tests
This commit is contained in:
parent
e5dd1e70b1
commit
aff231de53
30
.github/workflows/tests.yml
vendored
Normal file
30
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Unit Tests
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
name: Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goversion:
|
||||
- "1.17"
|
||||
- "1.16"
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.goversion }}
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Get dependencies
|
||||
run: go get ./...
|
||||
- name: Run Unit Tests
|
||||
run: go test -v -cover -race ./...
|
Loading…
Reference in New Issue
Block a user