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

Included a workflow to run functional tests on commenting on a PR #979

Merged
merged 1 commit into from
Oct 12, 2023
Merged
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
62 changes: 62 additions & 0 deletions .github/workflows/test-on-comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Kruize Remote monitoring functional tests

on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]

jobs:
functest:

# Only run this if the user asked us to
if: github.event.comment.body == 'run functional tests'

runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.16.0'
kubernetes version: 'v1.19.2'
- name: Build crc
run: |
echo Build crc
./build.sh -i autotune_operator:test_build
docker images | grep autotune
- name: Install Prometheus on minikube
run: |
echo Install Prometheus on minikube
cd scripts
./prometheus_on_minikube.sh -as

- name: Run Kruize remote monitoring functional tests on minikube
run: |
ps -ef | grep python
echo Running Kruize remote monitoring tests on minikube
cp ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml.old
sed -e "s/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g" ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml.old > ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml
cat ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml

cd tests
./test_autotune.sh -c minikube -i autotune_operator:test_build --testsuite=remote_monitoring_tests --resultsdir=${GITHUB_WORKSPACE}

- name: Capture ffdc logs
if: always()
run: |
./scripts/ffdc.sh -m crc -d ${GITHUB_WORKSPACE}/kruize_test_results

- name: Archive results
if: always()
run: |
cd ${GITHUB_WORKSPACE}
tar cvf kruize_test_results.tgz kruize_test_results

- name: Upload results
if: always()
uses: actions/upload-artifact@v3
with:
name: kruize_test_results
path: ./kruize_test_results.tar
retention-days: 2
Loading