This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
gold300jin pushed module-controller code #24
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: Module Controller Integration Test | |
run-name: ${{ github.actor }} pushed module-controller code | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'module-controller/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'module-controller/**' | |
# enable manually running the workflow | |
workflow_dispatch: | |
env: | |
CGO_ENABLED: 0 | |
GOOS: linux | |
WORK_DIR: module-controller | |
defaults: | |
run: | |
working-directory: module-controller | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Minikube | |
run: | | |
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | |
sudo install minikube-linux-amd64 /usr/local/bin/minikube | |
- name: Start Minikube | |
run: minikube start | |
- name: Prepare development env | |
run: | | |
kubectl apply -f config/crd/bases/serverless.alipay.com_moduledeployments.yaml | |
kubectl apply -f config/crd/bases/serverless.alipay.com_modulereplicasets.yaml | |
kubectl apply -f config/crd/bases/serverless.alipay.com_modules.yaml | |
kubectl apply -f config/crd/bases/serverless.alipay.com_moduletemplates.yaml | |
kubectl apply -f config/rbac/role.yaml | |
kubectl apply -f config/rbac/role_binding.yaml | |
kubectl apply -f config/rbac/service_account.yaml | |
kubectl apply -f config/samples/dynamic-stock-deployment.yaml | |
kubectl apply -f config/samples/module-deployment-controller.yaml | |
kubectl apply -f config/samples/dynamic-stock-service.yaml | |
- run: sleep 5 | |
- name: describe deployment | |
run: | | |
kubectl describe deployment dynamic-stock-deployment | |
- name: get pod | |
run: | | |
kubectl get pod | |
- name: wait base pod available | |
run: | | |
kubectl wait --for=condition=available deployment/dynamic-stock-deployment --timeout=30s | |
- name: get module controller pod available | |
run: | | |
kubectl wait --for=condition=available deployment/module-controller --timeout=30s | |
- name: Apply moduledeployment | |
run: | | |
kubectl apply -f config/samples/module-deployment_v1alpha1_moduledeployment_facade.yaml | |
- name: get moduledeployment | |
run: | | |
kubectl get moduledeployment | |
- name: get modulereplicaset | |
run: | | |
kubectl get modulereplicaset | |
- run: sleep 5 | |
- name: get module | |
run: | | |
kubectl get module |