Skip to content

Commit 7e0b3b3

Browse files
authored
GitHub Actions (#136)
This commit moves unit tests from Travis to GitHub Actions.
1 parent 7297806 commit 7e0b3b3

File tree

2 files changed

+37
-18
lines changed

2 files changed

+37
-18
lines changed

.github/workflows/unit.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on: [push, pull_request]
2+
name: Unit Testing
3+
jobs:
4+
test:
5+
runs-on: ubuntu-20.04
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
go-version:
10+
- "1.15"
11+
12+
env:
13+
GO111MODULE: "on"
14+
15+
steps:
16+
- name: Setup Go ${{ matrix.go-version }}
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: ${{ matrix.go-version }}
20+
21+
- uses: actions/checkout@v2
22+
23+
- name: Setup environment
24+
run: |
25+
go get golang.org/x/tools/cmd/goimports
26+
27+
- name: Run go vet
28+
run: |
29+
go vet ./...
30+
31+
- name: Run unit tests
32+
run: |
33+
go test -v ./...
34+
35+
- name: Check for formatting
36+
run:
37+
./script/format

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)