Skip to content

Commit 48e0828

Browse files
committed
added testing action
1 parent 5cf615a commit 48e0828

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/test-rancher.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Test Rancher Integration
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
rancher_image:
7+
description: 'Rancher server image (leave empty to auto-detect)'
8+
required: false
9+
type: string
10+
agent_image:
11+
description: 'Rancher agent image (leave empty to auto-detect)'
12+
required: false
13+
type: string
14+
skip_setup:
15+
description: 'Skip running the setup program'
16+
required: false
17+
type: boolean
18+
default: false
19+
20+
jobs:
21+
test-rancher:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
26+
27+
- name: Install Go
28+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
29+
with:
30+
go-version-file: 'go.mod'
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Install k3d
36+
run: |
37+
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.8.3 bash
38+
39+
- name: Verify Docker and k3d installation
40+
run: |
41+
docker --version
42+
k3d version
43+
44+
- name: Build Rancher
45+
run: |
46+
bash scripts/build-rancher.sh
47+
env:
48+
BUILD_SAFE_DIRS: ${{ github.workspace }}
49+
50+
- name: Test Rancher
51+
run: |
52+
bash scripts/test-rancher.sh
53+
env:
54+
RANCHER_IMAGE: ${{ inputs.rancher_image }}
55+
RANCHER_AGENT_IMAGE: ${{ inputs.agent_image }}
56+
CATTLE_BOOTSTRAP_PASSWORD: admin
57+
continue-on-error: false
58+

0 commit comments

Comments
 (0)