-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (91 loc) · 2.39 KB
/
Copy pathci.yml
File metadata and controls
114 lines (91 loc) · 2.39 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Download golangci-lint
run: make golangci-lint
- name: Run golangci-lint
run: make lint
test:
name: Unit & Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Download envtest binaries
run: make envtest
- name: Run tests
run: make test
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: cover.out
helm-lint:
name: Helm Lint & Dry-run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.14.0
- name: Lint Helm Chart
run: helm lint charts/agentrax/
- name: Template Helm Chart
run: helm template test charts/agentrax/ --debug
build:
name: Docker Build
runs-on: ubuntu-latest
needs: [lint, test, helm-lint]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU (cross-platform)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image (no push on PRs)
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: false
tags: ghcr.io/gitcommitankit/agentrax:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
e2e:
name: End-to-End Tests (kind)
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Create kind Cluster
uses: helm/[email protected]
with:
cluster_name: agentrax-e2e
- name: Install cluster dependencies
run: make deploy-deps
- name: Run E2E Tests
run: make test-e2e