This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (64 loc) · 1.59 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- name: checkout
uses: actions/checkout@v2
- name: lint
uses: golangci/golangci-lint-action@v2.5.1
with:
version: v1.38
skip-go-installation: true
args: --out-format github-actions
test:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- name: checkout
uses: actions/checkout@v2
- name: test
run: go test ./...
update-coverage:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: b619116e-c655-4475-bb4a-147415258236
steps:
- name: Setup Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- name: checkout
uses: actions/checkout@v2
- name: test
run: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash)
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
go get github.com/swaggo/swag/cmd/swag
make swag build