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

Improve GHA tests steps #51

Merged
merged 5 commits into from
Feb 6, 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
7 changes: 4 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:

- name: Install Azure cli
run: |
sudo zypper clean --all
sudo zypper install -y azure-cli
pip install azure-cli

Expand Down Expand Up @@ -172,23 +173,23 @@ jobs:
make e2e-provisioning-tests

- name: Importing cluster tests
if: ${{ inputs.run_p0_importing_tests == true }}
if: ${{ !cancelled() && inputs.run_p0_importing_tests == true }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! It works perfectly!

env:
RANCHER_HOSTNAME: ${{ steps.runner-ip.outputs.PUBLIC_IP}}.sslip.io
CATTLE_TEST_CONFIG: ${{ github.workspace }}/cattle-config-import.yaml
run: |
make e2e-import-tests

- name: Support matrix provisioning tests
if: ${{ inputs.run_support_matrix_provisioning_tests == true }}
if: ${{ !cancelled() && inputs.run_support_matrix_provisioning_tests == true }}
env:
RANCHER_HOSTNAME: ${{ steps.runner-ip.outputs.PUBLIC_IP}}.sslip.io
CATTLE_TEST_CONFIG: ${{ github.workspace }}/cattle-config-provisioning.yaml
run: |
make e2e-support-matrix-provisioning-tests

- name: Support matrix importing tests
if: ${{ inputs.run_support_matrix_importing_tests == true }}
if: ${{ !cancelled() && inputs.run_support_matrix_importing_tests == true }}
env:
RANCHER_HOSTNAME: ${{ steps.runner-ip.outputs.PUBLIC_IP}}.sslip.io
CATTLE_TEST_CONFIG: ${{ github.workspace }}/cattle-config-import.yaml
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ install-cert-manager: ## Install cert-manager via Helm on the k8s cluster
install-rancher: ## Install Rancher via Helm on the k8s cluster
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
helm install rancher --devel rancher-latest/rancher --version ${RANCHER_VERSION} \
helm install rancher --devel rancher-latest/rancher \
--namespace cattle-system \
--create-namespace \
--set global.cattle.psp.enabled=false \
Expand All @@ -42,7 +42,7 @@ install-rancher: ## Install Rancher via Helm on the k8s cluster
install-rancher-hosted-nightly-chart: ## Install Rancher via Helm with hosted providers nightly chart
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
helm install rancher --devel rancher-latest/rancher --version ${RANCHER_VERSION} \
helm install rancher --devel rancher-latest/rancher \
--namespace cattle-system \
--create-namespace \
--set global.cattle.psp.enabled=false \
Expand Down
9 changes: 5 additions & 4 deletions hosted/helpers/helper_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package helpers

import (
"fmt"
"github.com/onsi/ginkgo/v2"
"github.com/rancher/shepherd/extensions/clusters/aks"
"github.com/rancher/shepherd/extensions/clusters/eks"
"github.com/rancher/shepherd/extensions/clusters/gke"
"os"
"os/user"
"strings"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/rancher/shepherd/extensions/clusters/aks"
"github.com/rancher/shepherd/extensions/clusters/eks"
"github.com/rancher/shepherd/extensions/clusters/gke"

. "github.com/onsi/gomega"
"github.com/rancher/shepherd/clients/rancher"
management "github.com/rancher/shepherd/clients/rancher/generated/management/v3"
Expand Down