-
-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (58 loc) · 1.61 KB
/
tests.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
name: "tests"
on:
pull_request:
branches:
- master
env:
KUBECONFIG: ${{ github.workspace }}/.kube/config
jobs:
get_version_matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get_version_matrix
shell: bash
run: scripts/get-version-matrix.sh
outputs:
terraform_versions: ${{ steps.get_version_matrix.outputs.terraform_versions }}
k8s_versions: ${{ steps.get_version_matrix.outputs.k8s_versions }}
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Unit tests
env:
GOPATH: /home/runner/go
run: |
make test
make vet
acc_test:
needs: get_version_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
terraform_version: ${{ fromJson(needs.get_version_matrix.outputs.terraform_versions) }}
k8s_version: ${{ fromJson(needs.get_version_matrix.outputs.k8s_versions) }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: helm/kind-action@v1.10.0
id: kind
with:
wait: 2m
node_image: kindest/node:v${{ matrix.k8s_version }}
- name: Acceptance Tests
env:
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform_version }}
TESTARGS: "-parallel 1"
run: |
make testacc