Skip to content

Commit 36f192a

Browse files
committed
add workflow file
1 parent f53e337 commit 36f192a

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.github/workflows/build.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request: {}
8+
9+
jobs:
10+
tests:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ ubuntu-latest, macos-latest, windows-latest ]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-go@v3
18+
- name: tests
19+
run: |
20+
make test

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
vendor/
16+
17+
# coverage report file
18+
coverage.txt

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
build:
2+
go build
3+
4+
test:
5+
go test -v ./...
6+
7+
lint:
8+
go fmt ./...
9+
10+
coverage:
11+
go test -coverprofile=coverage.txt ./...
12+
13+
html: coverage
14+
go tool cover -html=coverage.txt

0 commit comments

Comments
 (0)