-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.2 KB
/
testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: testing
on:
push:
pull_request:
permissions:
contents: read
pull-requests: read
checks: write
jobs:
code-lint:
name: code-lint
runs-on: ubuntu-latest
steps:
- name: install deps
run: sudo apt install gcc
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4 # action page: <https://github.com/actions/setup-go>
with:
go-version: stable
- name: Install Go dependencies
run: go mod download
- name: Run linter
uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2 # without patch version
only-new-issues: false # show only new issues if it's a pull request
args: -v --timeout=10m --out-format=colored-line-number
unit-test:
name: unit-test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4 # action page: <https://github.com/actions/setup-go>
with:
go-version: stable
- name: Install Go dependencies
run: go mod download
- name: Run tests
run: go test ./...