mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-03-11 21:52:16 +08:00
* changed ubuntu runner * changed minikube action * Version formatting * nonedriveR * update kube version * installing conntrack' * updated other actions * update bg ingress api version * prettify * updated ingress backend for new api version * Added path type * prettify * added logging * added try catch logic to prevent future failures if annotations fail since failing annotations shouldn't affect users * added nullcheck * Added fallback filename if workflow fails to get github filepath due to runner issues * cleanup * added oliver's feedback + unit test demonstrating regex glitch and fix * no longer using blank string for failed regex * add tests and dont split so much * testing * file fix * without fix * Revert "without fix" This reverts commit 8da79a81904db93da579a82a2c93818ef4cb37ab. * fixing labels test * pretty * refactored getting tmp filename to use entire path, and refactored private to use filepath relative to tmp dir * wip * merging master * this should fail * added UTs * restructured plus UTs plus debug logs * resolved dir not existing and UTs * cleanup * no silent failure * Reverting private logic * this might work * root level files for temp... bizarre issue * need to actually write contents * no more cwdir * moving everything out of temp * deleting unused function * supporting windows filepaths for private cluster shallow path generation --------- Co-authored-by: David Gamero <david340804@gmail.com>
77 lines
3.2 KiB
YAML
77 lines
3.2 KiB
YAML
name: Minikube Integration Tests - basic
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
run-integration-test:
|
|
name: Run Minikube Integration Tests
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
KUBECONFIG: /home/runner/.kube/config
|
|
NAMESPACE: test-${{ github.run_id }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
rm -rf node_modules/
|
|
npm install
|
|
- name: Install ncc
|
|
run: npm i -g @vercel/ncc
|
|
- name: Install conntrack
|
|
run: sudo apt-get install -y conntrack
|
|
- name: Build
|
|
run: ncc build src/run.ts -o lib
|
|
|
|
- uses: Azure/setup-kubectl@v3
|
|
name: Install Kubectl
|
|
|
|
- id: setup-minikube
|
|
name: Setup Minikube
|
|
uses: medyagh/setup-minikube@latest
|
|
with:
|
|
minikube-version: 1.24.0
|
|
kubernetes-version: 1.22.3
|
|
driver: 'none'
|
|
timeout-minutes: 3
|
|
|
|
- name: Create namespace to run tests
|
|
run: kubectl create ns ${{ env.NAMESPACE }}
|
|
|
|
- uses: actions/setup-python@v2
|
|
name: Install Python
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Cleaning any previously created items
|
|
run: |
|
|
python test/integration/k8s-deploy-delete.py 'Service' 'all' ${{ env.NAMESPACE }}
|
|
python test/integration/k8s-deploy-delete.py 'Deployment' 'all' ${{ env.NAMESPACE }}
|
|
python test/integration/k8s-deploy-delete.py 'Ingress' 'all' ${{ env.NAMESPACE }}
|
|
|
|
- name: Executing deploy action for pod
|
|
uses: ./
|
|
with:
|
|
namespace: ${{ env.NAMESPACE }}
|
|
images: nginx:1.14.2
|
|
manifests: |
|
|
test/integration/manifests/test.yml
|
|
test/integration/manifests/manifest_test_dir/test.yml
|
|
action: deploy
|
|
|
|
- name: Checking if deployments and services were created
|
|
run: |
|
|
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment containerName=nginx:1.14.2 labels=app:nginx,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx
|
|
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx
|
|
|
|
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment3 containerName=nginx:1.14.2 labels=app:nginx3,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx3
|
|
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service3 labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx3
|