Chore: replace deprecated command with environment file #556
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Test | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- master | |
env: | |
GO_VERSION: '1.17.6' | |
KIND_VERSION: 'v0.12.0' | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
- name: Setup Kind | |
uses: engineerd/[email protected] | |
with: | |
version: ${{ env.KIND_VERSION }} | |
skipClusterCreation: true | |
- name: Setup Kind Cluster | |
run: | | |
kind delete cluster | |
kind create cluster --image kindest/node:v1.20.7@sha256:688fba5ce6b825be62a7c7fe1415b35da2bdfbb5a69227c499ea4cc0008661ca | |
kubectl version | |
kubectl cluster-info | |
- name: Load Image to kind cluster | |
run: make kind-load | |
- name: Install chart | |
run: | | |
kubectl cluster-info | |
echo "current-context:" $(kubectl config current-context) | |
helm upgrade --install --create-namespace --namespace terraform terraform-controller ./chart --set image.tag=e2e --set image.pullPolicy=IfNotPresent --set backend.namespace=terraform --wait | |
helm test -n terraform terraform-controller --timeout 5m | |
kubectl get pod -n terraform -l "app=terraform-controller" | |
- name: E2E tests | |
run: | | |
make configuration | |
env: | |
TERRAFORM_BACKEND_NAMESPACE: terraform | |
- name: dump controller logs | |
if: ${{ always() }} | |
run: kubectl logs deploy/terraform-controller -n terraform | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./e2e-coverage1.xml | |
flags: e2e |