-
Notifications
You must be signed in to change notification settings - Fork 6
101 lines (87 loc) · 2.27 KB
/
test.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
on: [push, pull_request]
name: test
jobs:
ldapmanager-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- uses: actions/setup-go@v3
with:
go-version: '1.19.x'
- name: Install code check tools
run: |
pip install pre-commit
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/lint/golint@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
- name: Code checks
run: pre-commit run --all-files
web-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Build dependencies
run: |
cd web
yarn install --dev
yarn build
- name: Run type checks
run: |
cd web/
yarn run type-check
- name: Run lint
run: |
cd web/
yarn run lint
helm-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint helm chart
run: helm lint deployment/helm/charts/ldapmanager/
ldapmanger-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- '1.19.x'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install prerequisites
run: |
go install github.com/kyoh86/richgo@latest
- name: Build
run: go build -race ./...
- name: Test
env:
RICHGO_FORCE_COLOR: "1"
# -failfast
run: >
richgo test
-race
-timeout 30m
-parallel 1
-coverpkg=all
-coverprofile=coverage.txt
-covermode=atomic
./...
- uses: codecov/codecov-action@v1
if: ${{ matrix.go-version == '1.19.x' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}>