Skip to content

Commit

Permalink
* Rewritten testing suite
Browse files Browse the repository at this point in the history
* Added kubernetes matrix for testing
* Added terraform 1.4 and 1.5 to the testing
  • Loading branch information
alekc committed Jul 18, 2023
1 parent 2b67d10 commit 264b687
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
get_version_matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- id: get_version_matrix
shell: bash
run: scripts/get-version-matrix.sh
outputs:
version_matrix: ${{ steps.get_version_matrix.outputs.matrix }}
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:
Expand All @@ -39,17 +40,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
terraform_version: ${{ fromJson(needs.get_version_matrix.outputs.version_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@master
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- uses: helm/kind-action@v1.4.0
- uses: helm/kind-action@v1.8.0
id: kind
with:
wait: 2m
node_image: kindest/node:v${{ matrix.k8s_version }}
- name: Acceptance Tests
env:
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
Expand Down
3 changes: 2 additions & 1 deletion scripts/get-version-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ function get_latest_version() {
sort -V -r | head -1
}

echo "::set-output name=matrix::[$(get_latest_version v0.12), $(get_latest_version v0.13), $(get_latest_version v0.14), $(get_latest_version v0.15), $(get_latest_version v1.0), $(get_latest_version v1.1), $(get_latest_version v1.2), $(get_latest_version v1.3)]"
echo terraform_versions="[$(get_latest_version v0.12), $(get_latest_version v0.13), $(get_latest_version v0.14), $(get_latest_version v0.15), $(get_latest_version v1.0), $(get_latest_version v1.1), $(get_latest_version v1.2), $(get_latest_version v1.3), $(get_latest_version v1.4), $(get_latest_version v1.5)]" >> $GITHUB_OUTPUT
echo k8s_versions='["1.27.3", "1.26.6", "1.25.11", "1.20.15"]' >> $GITHUB_OUTPUT

0 comments on commit 264b687

Please sign in to comment.