Get HPO working again #210
Workflow file for this run
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: HPO Test on Pull Request | |
# Controls when the action will run. | |
on: | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test_on_docker: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Build hpo | |
run: | | |
echo Software versions | |
python --version | |
curl -V | |
echo Building hpo container image | |
ls | |
./build_hpo.sh -o hpo:test | |
docker images | grep hpo | |
- name: GRPC Sanity test on docker | |
run: | | |
echo Installing grpcio package | |
pip install grpcio | |
echo Install protobuf 4.21.8 | |
pip install protobuf==4.21.8 | |
echo Running GRPC sanity test on docker | |
ls | |
cd tests | |
./test_hpo.sh -c docker -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_grpc_sanity_test | |
- name: Sanity test on docker | |
run: | | |
echo Running sanity test on docker | |
ls | |
cd tests | |
./test_hpo.sh -c docker -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_sanity_test | |
- name: Archive results | |
if: always() | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
tar cvf hpo_docker_results.tar hpo_test_results | |
- name: Upload results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hpo-results | |
path: ./hpo_docker_results.tar | |
retention-days: 2 | |
test_on_minikube: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Setup Minikube | |
uses: manusa/[email protected] | |
with: | |
minikube version: 'v1.16.0' | |
kubernetes version: 'v1.19.2' | |
- name: Display minikube cluster info and pods | |
run: | | |
kubectl cluster-info | |
kubectl get pods -n kube-system | |
- name: Build hpo | |
run: | | |
echo Software versions | |
python --version | |
curl -V | |
echo Building hpo container image | |
ls | |
./build_hpo.sh -o hpo:test | |
docker images | grep hpo | |
- name: Sanity test on minikube | |
run: | | |
ps -ef | grep python | |
echo Running sanity test on minikube | |
ls | |
cp ./manifests/hpo-deployment.yaml_template ./manifests/hpo-deployment.yaml_template.old | |
sed -e "s/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g" ./manifests/hpo-deployment.yaml_template.old > ./manifests/hpo-deployment.yaml_template | |
cd tests | |
./test_hpo.sh -c minikube -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests \ | |
--testcase=hpo_sanity_test | |
- name: Archive results | |
if: always() | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
ls | |
tar cvf hpo_minikube_results.tar hpo_test_results | |
ls | |
- name: Upload results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hpo-results | |
path: ./hpo_minikube_results.tar | |
retention-days: 2 | |
test_on_native: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Sanity test on native | |
run: | | |
echo Software versions | |
python --version | |
curl -V | |
echo Running sanity test on native | |
cd tests | |
./test_hpo.sh -c native --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_sanity_test | |
- name: Archive results | |
if: always() | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
tar cvf hpo_native_results.tar hpo_test_results | |
- name: Upload results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hpo-results | |
path: ./hpo_native_results.tar | |
retention-days: 2 | |
grpc_test_on_native: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: GRPC Sanity test on native | |
run: | | |
echo Software versions | |
python --version | |
curl -V | |
echo Running GRPC sanity test on native | |
cd tests | |
./test_hpo.sh -c native --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_grpc_sanity_test | |
- name: Archive results | |
if: failure() | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
tar cvf hpo_grpc_native_results.tar hpo_test_results | |
- name: Upload results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hpo-results | |
path: ./hpo_grpc_native_results.tar | |
retention-days: 2 | |