Skip to content

Commit

Permalink
Add test for autoscaling count
Browse files Browse the repository at this point in the history
[skip ci]

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Dec 2, 2024
1 parent cf0c839 commit 4275199
Show file tree
Hide file tree
Showing 16 changed files with 487 additions and 210 deletions.
93 changes: 40 additions & 53 deletions .github/workflows/k8s-scaling-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,43 @@ permissions:
jobs:
build-and-test:
name: Test K8s
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_job_count_chaos
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
python-version: '3.13'
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_job_count_max_sessions
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
python-version: '3.13'
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_job_count
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
python-version: '3.13'
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_deployment_count_chaos
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
python-version: '3.13'
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_deployment_count_max_sessions
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
python-version: '3.13'
- k8s-version: 'v1.31.2'
test-strategy: chart_test_autoscaling_deployment_count
cluster: 'minikube'
helm-version: 'v3.16.3'
docker-version: '27.3.1'
Expand Down Expand Up @@ -53,8 +84,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Verify chart configuration up-to-date
run: make lint_readme_charts
- name: Get branch name (only for push to branch)
if: github.event_name == 'push'
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
Expand All @@ -79,11 +108,6 @@ jobs:
echo "AUTHORS=${AUTHORS}" >> $GITHUB_ENV
env:
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
- name: Build Helm charts
run: |
BUILD_DATE=${BUILD_DATE} make chart_build
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Build Docker images
uses: nick-invision/retry@master
with:
Expand All @@ -97,61 +121,24 @@ jobs:
timeout_minutes: 10
max_attempts: 3
command: CLUSTER=${CLUSTER} SERVICE_MESH=${SERVICE_MESH} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
- name: Build Helm charts
run: |
BUILD_DATE=${BUILD_DATE} make chart_build
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Test Selenium Grid on Kubernetes with Autoscaling
uses: nick-invision/retry@master
with:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_job_count_chaos
- name: Upload results
if: always()
uses: actions/upload-artifact@main
with:
name: chart_test_autoscaling_job_count_chaos
path: ./tests/tests/*.md
if-no-files-found: ignore
- name: Test Selenium Grid on Kubernetes with Autoscaling
uses: nick-invision/retry@master
with:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_job_count_max_sessions
- name: Upload results
if: always()
uses: actions/upload-artifact@main
with:
name: chart_test_autoscaling_job_count_max_sessions
path: ./tests/tests/*.md
if-no-files-found: ignore
- name: Test Selenium Grid on Kubernetes with Autoscaling
uses: nick-invision/retry@master
with:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_job_count_strategy_accurate
- name: Upload results
if: always()
uses: actions/upload-artifact@main
with:
name: chart_test_autoscaling_job_count_strategy_accurate
path: ./tests/tests/*.md
if-no-files-found: ignore
- name: Test Selenium Grid on Kubernetes with Autoscaling
uses: nick-invision/retry@master
with:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_job_count
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make ${{ matrix.test-strategy }}
- name: Upload results
if: always()
uses: actions/upload-artifact@main
with:
name: chart_test_autoscaling_job_count
path: ./tests/tests/*.md
name: ${{ matrix.test-strategy }}.md
path: ./tests/tests/scale_up_results.md
if-no-files-found: ignore
- name: Cleanup Kubernetes cluster
if: always()
Expand Down
Loading

0 comments on commit 4275199

Please sign in to comment.