Skip to content

Commit 8ee48a9

Browse files
authored
Add linter (#26)
1 parent 7a1246e commit 8ee48a9

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

.github/workflows/go.yml

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

.github/workflows/review.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Review
2+
on:
3+
push:
4+
branches-ignore:
5+
- master
6+
jobs:
7+
golangci-lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out code into the Go module directory
11+
uses: actions/checkout@v3
12+
13+
- name: golangci-lint
14+
uses: reviewdog/[email protected]

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Set up Go 1.18
8+
uses: actions/setup-go@v3
9+
with:
10+
go-version: 1.18
11+
id: go
12+
13+
- name: Check out code into the Go module directory
14+
uses: actions/checkout@v3
15+
16+
- name: Get dependencies
17+
run: |
18+
go get -v -t -d ./...
19+
20+
- name: Test
21+
run: |
22+
go test -v -cover -count 1 -coverprofile="./coverage.out" -covermode=atomic
23+
ls
24+
25+
- uses: codecov/codecov-action@v1
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
file: ./coverage.out
29+
fail_ci_if_error: true

0 commit comments

Comments
 (0)