-
Notifications
You must be signed in to change notification settings - Fork 974
68 lines (65 loc) · 2.47 KB
/
manifest_acc.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
name: Manifest acceptance tests
on:
push:
branches:
- main
paths:
- "manifest/**/*.go"
- "manifest/**/go.mod"
pull_request:
branches:
- main
paths:
- "manifest/**/*.go"
- "manifest/**/go.mod"
workflow_dispatch:
env:
KUBECONFIG: ${{ github.workspace }}/.kube/config
jobs:
acceptance_tests:
runs-on: ubuntu-latest
strategy:
# Don't cancel all in-progress and queued jobs in the matrix if any job in the matrix fails.
# That will be helpful to catch any issues related to a particular Kubernetes version.
fail-fast: false
matrix:
kubernetes_version:
# kind images: https://github.com/kubernetes-sigs/kind/releases
- v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
- v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
- v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
- v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
- v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb
terraform_version:
- 1.8.5
- 1.6.6
- 1.5.7
- 1.4.7
- 1.3.10
- 1.2.9
- 1.1.9
- 1.0.11
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
- name: Setup kind
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with:
version: v0.20.0
node_image: kindest/node:${{ matrix.kubernetes_version }}
# By default, this action creates a cluster with the name 'chart-testing'
cluster_name: manifest
- name: Build annotations webhook
run: |
docker build --rm -t tf-k8s-acc-webhook ./manifest/test/acceptance/testdata/ComputedFields/webhook/
kind load docker-image tf-k8s-acc-webhook --name=manifest
- name: Run tests
env:
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform_version }}
run: |
go test -count=1 -tags acceptance -v ./manifest/test/acceptance/... -timeout 120m