-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (75 loc) · 1.88 KB
/
test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Test GHA Docs
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
GO_VERSION: 1.17
GOLANGCI_LINT_VERSION: v1.42.1
GOTESTSUM_VERSION: 1.7.0
TASK_VERSION: 3.9.0
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: "0"
- uses: wagoid/commitlint-github-action@v4
- name: Setup go
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Task
uses: arduino/setup-task@v1
with:
version: ${{ env.TASK_VERSION }}
- name: Verify
run: |
task verify
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
skip-go-installation: true
args: -v
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: "0"
- name: Setup go
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Task
uses: arduino/setup-task@v1
with:
version: ${{ env.TASK_VERSION }}
- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: ${{ env.GOTESTSUM_VERSION }}
- name: Run tests
run: |
task test
continue-on-error: true
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: github.event_name == 'pull_request'
with:
fail_on_failure: true
report_paths: junit.xml
- name: Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.out
flags: unittests
name: gha-docs