-
Notifications
You must be signed in to change notification settings - Fork 11
92 lines (77 loc) · 2.4 KB
/
actions.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
name: Load Balancer Operator for Kubernetes Checks
on:
pull_request:
types: [opened, synchronize]
env:
GO_VERSION: '1.22'
jobs:
lint:
name: lint-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-go@v5
with:
stable: 'true'
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for linting
run: cd hack/tools && make golangci-lint
- name: Install npm
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdown-lint tool
run: npm install -g markdownlint-cli
- name: Perform golang code linting
run: make lint-go
- name: Perform markdown linting
run: make lint-markdown
- name: Perform shell scripts linting with shellcheck
run: make lint-shell
unit-test:
name: unit-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-go@v5
with:
stable: 'true'
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for unit testing
run: cd hack/tools && make controller-gen etcd ginkgo kustomize
- name: Perform unit tests and output coverage
run: make cover
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: cover.out
verbose: true
intg_test:
name: integration-test
runs-on: ubuntu-latest
needs: [ lint ]
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-go@v5
with:
stable: 'true'
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for integration testing
run: cd hack/tools && make controller-gen etcd ginkgo kustomize
- name: Perform integration tests
run: make integration-test
docker_img:
name: build-lb-operator-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-go@v5
with:
stable: 'true'
go-version: ${{ env.GO_VERSION }}
# uncomment this step for debugging: tmate session
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Build Docker Image
run: docker build . -t ako-operator:latest -f Dockerfile