generated from evrone/go-clean-template
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 2.04 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
70
71
72
73
74
75
76
77
78
79
80
name: CI
on: pull_request
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
yamllint:
name: runner / yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-yamllint@v1
with:
fail_on_error: true
reporter: github-pr-review
yamllint_flags: '-d "{extends: default, rules: {truthy: disable}}" .'
hadolint:
name: runner / hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-hadolint@v1
with:
fail_on_error: true
reporter: github-pr-review
dotenv-linter:
name: runner / dotenv-linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dotenv-linter/action-dotenv-linter@v2
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
check-dependencies:
name: runner / check-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: WriteGoList
run: go list -json -m all > go.list
- name: Nancy
uses: sonatype-nexus-community/nancy-github-action@main
continue-on-error: true
tests:
name: runner / tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Unit Tests
run: "go test \
-v \
-race \
-covermode atomic \
-coverprofile=coverage.txt \
./internal/..."
- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
- name: Integration tests
run: "docker-compose up \
--build \
--abort-on-container-exit \
--exit-code-from integration"