-
Notifications
You must be signed in to change notification settings - Fork 7
124 lines (105 loc) · 3.64 KB
/
Copy pathintegration-tests.yml
File metadata and controls
124 lines (105 loc) · 3.64 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
115
116
117
118
119
120
121
122
123
124
name: Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: integration-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
BINK_IMAGES: >-
ghcr.io/bootc-dev/bink/cluster:latest
ghcr.io/bootc-dev/bink/node:v1.35-fedora-44-disk
ghcr.io/bootc-dev/bink/dns:latest
EXTERNAL_IMAGES: >-
docker.io/library/registry:2
docker.io/library/haproxy:lts-alpine
quay.io/libpod/busybox:latest
jobs:
supported-versions:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Get supported Kubernetes versions
id: set-matrix
run: |
DEFAULT="1.35"
# Exclude the default version — the integration-tests job already runs the full suite for it
MATRIX=$(curl -s https://endoflife.date/api/kubernetes.json | \
jq -c --arg default "$DEFAULT" \
'[.[] | select(.eol > (now | strftime("%Y-%m-%d"))) | .cycle][:3] | map(select(. != $default))')
echo "matrix=${MATRIX}" >> "$GITHUB_OUTPUT"
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup bink
uses: ./.github/actions/setup-bink
with:
cache-key-prefix: integration
- name: Run integration tests
run: sudo make test-integration TEST_PROCS=2
timeout-minutes: 90
env:
CONTAINER_HOST: unix:///run/podman/podman.sock
- name: Collect logs
if: failure()
run: .github/collect-logs.sh
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-logs
path: /tmp/bink-logs/
- name: Cleanup test clusters
if: always()
run: |
sudo podman ps -a --filter "name=k8s-test-bink" --format '{{.Names}}' | \
xargs -r sudo podman rm -f 2>/dev/null || true
sudo podman volume prune -f 2>/dev/null || true
integration-tests-k8s-versions:
needs: supported-versions
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
kube-minor: ${{ fromJson(needs.supported-versions.outputs.matrix) }}
env:
BINK_NODE_IMAGE: ghcr.io/bootc-dev/bink/node:v${{ matrix.kube-minor }}-fedora-44-disk
BINK_IMAGES: >-
ghcr.io/bootc-dev/bink/cluster:latest
ghcr.io/bootc-dev/bink/node:v${{ matrix.kube-minor }}-fedora-44-disk
ghcr.io/bootc-dev/bink/dns:latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup bink
uses: ./.github/actions/setup-bink
with:
cache-key-prefix: k8s-${{ matrix.kube-minor }}
- name: Run integration tests (K8s ${{ matrix.kube-minor }})
run: sudo make test-integration GINKGO_FOCUS="should create and initialize a complete Kubernetes cluster"
timeout-minutes: 90
env:
CONTAINER_HOST: unix:///run/podman/podman.sock
BINK_NODE_IMAGE: ${{ env.BINK_NODE_IMAGE }}
- name: Collect logs
if: failure()
run: .github/collect-logs.sh
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-logs-k8s-${{ matrix.kube-minor }}
path: /tmp/bink-logs/
- name: Cleanup test clusters
if: always()
run: |
sudo podman ps -a --filter "name=k8s-test-bink" --format '{{.Names}}' | \
xargs -r sudo podman rm -f 2>/dev/null || true
sudo podman volume prune -f 2>/dev/null || true