-
Notifications
You must be signed in to change notification settings - Fork 103
65 lines (59 loc) · 1.78 KB
/
test_e2e.yml
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
name: Run e2e tests
on:
pull_request: {}
push:
branches: [main]
concurrency: ci-${{ github.ref }}
jobs:
test-kubernetes:
name: k3s ${{ matrix.k3s }}
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
# The e2e tests are flaky and often one of the jobs fails. The default setting
# causes all other currently running jobs to abort and all need to be restarted.
fail-fast: false
matrix:
include:
- k3s: v1.24
k8s-test: v1.24.13
- k3s: v1.25
k8s-test: v1.25.9
- k3s: v1.26
k8s-test: v1.26.4
- k3s: v1.27
k8s-test: v1.27.1
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.19'
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: hetznercloud/tps-action@main
with:
token: ${{ secrets.HCLOUD_TOKEN }}
- uses: 3bit/setup-hcloud@v2
- uses: yokawasa/[email protected]
with:
setup-tools: |
helm
kubectl
skaffold
helm: v3.11.2
kubectl: v1.26.3
skaffold: v2.3.0
- name: Run tests
env:
K3S_CHANNEL: ${{ matrix.k3s }}
K8S_TEST_VERSION: ${{ matrix.k8s-test }}
SCOPE: gha-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.k3s }}
run: |
curl -sLS https://get.k3sup.dev | sh
trap "hack/dev-down.sh" EXIT
source <(hack/dev-up.sh)
skaffold build --tag="e2e-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}"
tag=$(skaffold build --tag="e2e-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}" --quiet --output="{{ (index .Builds 0).Tag }}")
skaffold deploy --images=hetznercloud/hcloud-csi-driver=$tag
test/e2e/kubernetes/run-e2e-tests.sh