-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.56 KB
/
test-e2e.yaml
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
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Test E2E
on:
# Manual Trigger
workflow_dispatch: {}
# Run on any PR that changes this pipeline or that should ultimately trigger a release when merged
pull_request:
paths:
- ".github/workflows/test.yaml"
- "go.mod"
- "go.sum"
- "**/**.go"
env:
TALOSCONFIG_DIR: ./configs/
TALSWITCHER_LOG_LEVEL: debug
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Build `talswitcher`
run: go build -o talswitcher
- name: Install `talosctl`
run: curl -sL https://talos.dev/install | sh
- name: Set Up Talos Clusters
run: |
talosctl cluster create --name=test-cluster-1 --talosconfig=./configs/talos1.yaml --cidr=10.5.0.0/24 &
talosctl cluster create --name=test-cluster-2 --talosconfig=./configs/talos2.yaml --cidr=10.6.0.0/24 &
wait
- name: Run talswitcher - switch to cluster 1
run: ./talswitcher test-cluster-1
- name: List Talos Members
run: talosctl get members -n test-cluster-1-controlplane-1
- name: Run talswitcher - switch to cluster 2
run: ./talswitcher test-cluster-2
- name: List Talos Members
run: talosctl get members -n test-cluster-2-controlplane-1
- name: Try to List Members of Cluster 1
run: talosctl get members -n test-cluster-1-controlplane-1 && exit 1 || echo "This was supposed to fail!"