-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (37 loc) · 911 Bytes
/
ci.yml
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
name: continuous integration (CI)
on:
push:
paths:
- main/**
jobs:
golangci-lint:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Install golang
uses: actions/setup-go@v3
with:
go-version-file: 'main/.go-version'
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
working-directory: main
version: v1.54.2
args: --timeout=2m
test-go-binary:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Install golang
uses: actions/setup-go@v3
with:
go-version-file: 'main/.go-version'
- name: Run unit tests
run: |
cd main/
go mod tidy
go test ./... --cover