Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Add testing by installing on GCE #1496

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/functional_test_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,44 @@ jobs:
run: |
cd functional_tests
TEARDOWN_BEFORE_SETUP=true go test -v -tags functional
gce-autopilot-test:
name: Test helm install in GCE (kops) - credentials needed
needs: kubernetes-test
if: github.event.pull_request.head.repo.full_name == github.repository
concurrency:
group: gce-access
env:
KUBE_TEST_ENV: gce
SKIP_TESTS: "true"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.21.8
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Update dependencies
run: |
make dep-update
- name: Set kubeconfig
run: echo "$GCE_KUBECONFIG" > /tmp/kubeconfig
env:
GCE_KUBECONFIG: ${{ secrets.GCE_KUBECONFIG }}
- name: run functional tests
uses: mobiledevops/secret-to-file-action@v1
env:
HOST_ENDPOINT: 0.0.0.0
KUBECONFIG: /tmp/kubeconfig
run: |
cd functional_tests
TEARDOWN_BEFORE_SETUP=true go test -v -tags functional
3 changes: 2 additions & 1 deletion functional_tests/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const (
eksTestKubeEnv = "eks"
autopilotTestKubeEnv = "gke/autopilot"
aksTestKubeEnv = "aks"
gceTestKubeEnv = "gce"
testDir = "testdata"
valuesDir = "values"
manifestsDir = "manifests"
Expand Down Expand Up @@ -532,7 +533,7 @@ func Test_Functions(t *testing.T) {
require.True(t, setKubeTestEnv, "the environment variable KUBE_TEST_ENV must be set")

switch kubeTestEnv {
case kindTestKubeEnv, autopilotTestKubeEnv, aksTestKubeEnv:
case kindTestKubeEnv, autopilotTestKubeEnv, aksTestKubeEnv, gceTestKubeEnv:
expectedValuesDir = kindValuesDir
case eksTestKubeEnv:
expectedValuesDir = eksValuesDir
Expand Down