Skip to content

Commit 7be5756

Browse files
authored
Add github action and golangci-lint (#84)
1 parent ec082b6 commit 7be5756

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/go.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-go@v3
18+
with:
19+
go-version: "1.18"
20+
check-latest: true
21+
cache: true
22+
- run: go test -race -failfast ./...
23+
golangci-lint:
24+
name: golangci-lint
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: actions/setup-go@v3
29+
with:
30+
go-version: "1.18"
31+
check-latest: true
32+
cache: true
33+
- uses: golangci/golangci-lint-action@v3
34+
with:
35+
version: latest

.golangci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
run:
2+
tests: false
3+
4+
output:
5+
sort-results: true

0 commit comments

Comments
 (0)