generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.7 KB
/
test.yaml
File metadata and controls
67 lines (55 loc) · 1.7 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
name: Tests
on:
pull_request:
push:
branches: [ main ]
jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
with:
go-version: '1.25'
- name: Show Go env
run: |
go version
go env
- name: Tidy modules
run: make tidy
- name: Run unit tests
run: make test
e2e:
name: E2E tests (k3d)
needs: unit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
with:
go-version: '1.25'
- name: Install kubectl
uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
with:
version: 'v1.29.0' # any modern kubectl compatible with k3d's default
- name: Install k3d
run: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d version
- name: Build binary
run: make build
- name: Run E2E tests
env:
# Optional: customize e2e settings via Makefile variables if needed
# E2E_CLUSTER_NAME: cloudctl-e2e
# E2E_TAGS: e2e
# E2E_KUBECONFIG: ${{ github.workspace }}/e2e/e2e-kubeconfig
# E2E_BIN: ${{ github.workspace }}/bin/cloudctl
# Increase verbosity by adding GOFLAGS=-v or similar if desired
GOFLAGS: ""
run: make e2e