Skip to content

Commit d49291f

Browse files
authored
Update GH workflows (#2041)
1 parent a9be44b commit d49291f

File tree

7 files changed

+42
-26
lines changed

7 files changed

+42
-26
lines changed

.github/workflows/acceptance_tests_eks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
default: 2
1212
clusterVersion:
1313
description: The EKS cluster version
14-
default: 1.23
14+
default: 1.25
1515
nodesPerAz:
1616
description: The number of cluster nodes in each AZ
1717
default: 2
@@ -23,7 +23,7 @@ on:
2323
default: ".*"
2424
terraformVersion:
2525
description: Terraform version
26-
default: 1.3.6
26+
default: 1.4.0
2727

2828
env:
2929
AWS_REGION: ${{ github.event.inputs.region }}

.github/workflows/acceptance_tests_gke.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
default: ^TestAcc
2424
terraformVersion:
2525
description: Terraform version
26-
default: 1.3.6
26+
default: 1.4.0
2727

2828
env:
2929
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}

.github/workflows/acceptance_tests_kind.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ on:
55
inputs:
66
kindVersion:
77
description: The kind version
8-
default: 0.12.0
8+
default: 0.17.0 # Kubernetes version: 1.25.X
99
runTests:
1010
description: The regex passed to the -run option of `go test`
1111
default: ".*"
1212
terraformVersion:
1313
description: Terraform version
14-
default: 1.3.6
14+
default: 1.4.0
15+
16+
env:
17+
KUBECONFIG: ${{ github.workspace }}/.kube/config
1518

1619
jobs:
1720
acceptance_tests:
@@ -27,13 +30,14 @@ jobs:
2730
with:
2831
terraform_version: ${{ github.event.inputs.terraformVersion }}
2932
- name: Setup kind
30-
uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
33+
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
3134
with:
35+
wait: 2m
3236
version: v${{ github.event.inputs.kindVersion }}
3337
- name: Run Acceptance Test Suite
3438
env:
39+
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
3540
TF_ACC_TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion }}
3641
TESTARGS: -run '${{ github.event.inputs.runTests }}'
37-
KUBE_CONFIG_PATH: "~/.kube/config"
3842
run: |
3943
make testacc

.github/workflows/check_examples.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Check examples
2+
23
on:
34
push:
45
branches:
@@ -12,6 +13,11 @@ on:
1213
paths:
1314
- "_examples/kubernetes_manifest/**"
1415
- "**.go"
16+
workflow_dispatch:
17+
18+
env:
19+
KUBECONFIG: ${{ github.workspace }}/.kube/config
20+
1521
jobs:
1622
check:
1723
runs-on: ubuntu-latest
@@ -21,10 +27,10 @@ jobs:
2127
- "1.0.11"
2228
- "1.1.9"
2329
- "1.2.9"
24-
- "1.3.8"
30+
- "1.3.9"
31+
- "1.4.0"
2532
env:
2633
TF_X_KUBERNETES_MANIFEST_RESOURCE: 1
27-
KUBE_CONFIG_PATH: "~/.kube/config"
2834
TERM: linux
2935
steps:
3036
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
@@ -39,8 +45,12 @@ jobs:
3945
run: go mod verify
4046
- name: Go build
4147
run: go build
42-
- uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
48+
- name: Setup kind
49+
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
4350
with:
44-
version: "v0.11.1"
51+
wait: 2m
52+
version: "v0.17.0" # Kubernetes version: 1.25.X
4553
- name: Check examples run
54+
env:
55+
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
4656
run: ./manifest/scripts/check_examples.sh

.github/workflows/manifest_acc.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- "manifest/**/*.go"
1414
workflow_dispatch:
1515

16+
env:
17+
KUBECONFIG: ${{ github.workspace }}/.kube/config
18+
1619
jobs:
1720
acceptance_tests:
1821
runs-on: ubuntu-latest
@@ -27,30 +30,35 @@ jobs:
2730
- v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315
2831
- v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61
2932
terraform_version:
30-
- 1.3.8
33+
- 1.4.0
34+
- 1.3.9
3135
- 1.2.9
3236
- 1.1.9
3337
- 1.0.11
3438
# BONUS: Run tests on the latest available Kubernetes(1.X) and Terraform(1.X) versions.
3539
include:
3640
- kubernetes_version: v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352
37-
terraform_version: 1.3.8
41+
terraform_version: 1.4.0
3842
steps:
3943
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
4044
- name: Set up Go
4145
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
4246
with:
4347
go-version-file: 'go.mod'
44-
- uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
48+
- name: Setup kind
49+
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
4550
with:
4651
version: v0.17.0
47-
image: kindest/node:${{ matrix.kubernetes_version }}
52+
node_image: kindest/node:${{ matrix.kubernetes_version }}
53+
# By default, this action creates a cluster with the name 'chart-testing'
54+
cluster_name: manifest
4855
- name: Build annotations webhook
4956
run: |
5057
docker build --rm -t tf-k8s-acc-webhook ./manifest/test/acceptance/testdata/ComputedFields/webhook/
51-
kind load docker-image tf-k8s-acc-webhook
58+
kind load docker-image tf-k8s-acc-webhook --name=manifest
5259
- name: Run tests
5360
env:
61+
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
5462
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform_version }}
5563
run: |
56-
KUBE_CONFIG_PATH="${HOME}/.kube/config" go test -count=1 -tags acceptance -v ./manifest/test/acceptance/... -timeout 120m
64+
go test -count=1 -tags acceptance -v ./manifest/test/acceptance/... -timeout 120m

.github/workflows/test.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@ jobs:
1717
config-file: '.github/workflows/markdown.links.config.json'
1818
folder-path: 'website/'
1919
test:
20-
env:
21-
GO111MODULE: on
22-
strategy:
23-
matrix:
24-
go-version: [1.19.x]
25-
os: [ubuntu-latest]
26-
runs-on: ${{ matrix.os }}
20+
runs-on: ubuntu-latest
2721
steps:
22+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
2823
- name: Set up Go
2924
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
3025
with:
31-
go-version: ${{ matrix.go-version }}
26+
go-version-file: 'go.mod'
3227
# Secrets are not available on pull requests.
3328
- name: Login to Docker Hub
3429
if: github.ref == 'refs/heads/main'

.go-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)