-
Notifications
You must be signed in to change notification settings - Fork 69
92 lines (89 loc) · 2.58 KB
/
ci.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
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
name: Backup Restore CI
permissions:
contents : read
on:
workflow_call:
push:
branches:
- main
- release/v5.0
- release/v4.0
- release/v3.0
- release/v[0-9]+.[0-9]+.[0-9]+
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
jobs:
build:
strategy:
matrix:
arch:
- x64
- arm64
name : CI
runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }}
outputs:
k3sversions: ${{ steps.support.outputs.k3sversions }}
steps:
- name : Checkout repository
uses : actions/checkout@v4
with :
fetch-depth : 0
- name: Set K3s support output
id : support
run: ./.github/workflows/scripts/supported-versions.sh | awk '{print "k3sversions="$0}' >> $GITHUB_OUTPUT
- name : CI
run : make ci
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bro-build-artifacts-${{ matrix.arch }}
path: ./dist/artifacts
test:
name : integration-test
needs : [
build
]
runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }}
strategy:
matrix:
arch:
- x64
- arm64
K3S_VERSION : ${{ fromJSON(needs.build.outputs.k3sversions) }}
steps:
- name : Checkout repository
uses : actions/checkout@v4
- name : Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: bro-build-artifacts-${{ matrix.arch }}
path: ./dist/artifacts/
- name : Debug
run : ls -R ./dist/artifacts
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name : Load backup-restore-operator image
run : docker image load -i ./dist/artifacts/backup-restore-operator.img
- name: Install go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name : Install k3d
run : ./.github/workflows/scripts/install-k3d.sh
- name : Install minio client
run : ./.github/workflows/scripts/install-mc.sh
- name : Setup k3d cluster
run : CLUSTER_NAME=backup-restore K3S_VERSION=${{ matrix.K3S_VERSION }} ./.github/workflows/scripts/setup-cluster.sh
- name : Run integration tests
run : ./scripts/integration