-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.1 KB
/
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
46
47
48
49
50
51
52
53
54
name: ci
on:
pull_request:
push:
branches:
- main
tags:
- 'v*.*.*'
jobs:
build_and_test:
name: build_and_test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Check for markdown Lint
run: |
sudo npm install -g markdownlint-cli
markdownlint .
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.22.x'
- name: Check go.mod and go.sum are tidy
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
- name: Build Source
run: go build ./...
- name: Install Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.60
skip-pkg-cache: true
skip-build-cache: true
- name: Run Lint
run: |
golangci-lint run
- name: Run Tests
run: go test -coverprofile cover.out -race ./...
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
files: cover.out
flags: unittests
name: codecov