-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.71 KB
/
Copy pathci.yml
File metadata and controls
55 lines (49 loc) · 1.71 KB
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
name: ci
# PR 게이트. 이 repo 는 release.yml 하나만 있어 **테스트가 CI 에서 한 번도 실행된
# 적이 없었다** — 131 개 테스트·80% 커버리지가 있는데도 회귀가 그대로 머지되어
# 그대로 발행되는 구조였다. 새 도구를 들이지 않고 Makefile 의 기존 타깃만 연결한다.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
go:
name: fmt + vet + test + build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- run: make fmt
- run: make vet
# build 는 CGO_ENABLED=1 (go-nvml + node_exporter collector) — 헤더가 필요하다.
- name: apt deps for cgo build
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential
- run: make test
- name: Coverage floor (ratchet)
env:
COVERAGE_FLOOR: "70"
run: bash hack/coverage-floor.sh cover.out
- run: make build
chart:
name: chart lint + secret isolation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: azure/setup-helm@v4
- name: Install kubeconform
run: |
set -euo pipefail
curl -fsSL -o /tmp/kubeconform.tar.gz \
https://github.com/yannh/kubeconform/releases/download/v0.6.7/kubeconform-linux-amd64.tar.gz
tar -xzf /tmp/kubeconform.tar.gz -C /tmp kubeconform
sudo install /tmp/kubeconform /usr/local/bin/kubeconform
- run: make chart-lint
- run: make chart-test