-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (46 loc) · 1.33 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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Quality check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
lint:
name: Linter
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.2
fail_ci_if_error: true
tests:
name: Tests
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Run tests
run: go mod download; go test -cover -coverprofile=./unit-cover.txt -race ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./unit-cover.txt
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true