Merge pull request #138 from shreyabiradar07/fix_validationError_type… #58
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: Test on Push | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push event but only for the master branch | |
push: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} | |
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | |
REGISTRY_EMAIL: ${{ secrets.REGISTRY_EMAIL }} | |
jobs: | |
# This workflow contains a single job called "deploy" | |
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 Build hpo | |
./build_hpo.sh -o hpo:test | |
docker images | grep hpo | |
- name: docker login | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Docker Push | |
run: | | |
docker tag hpo:test kruize/hpo:test | |
docker push kruize/hpo:test | |
- name: Sanity test on docker | |
run: | | |
echo Running sanity test on docker | |
ls | |
cd tests | |
./test_hpo.sh -c docker -o kruize/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 | |
needs: test_on_docker | |
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: Sanity test on minikube | |
run: | | |
ps -ef | grep python | |
echo Running sanity test on minikube | |
ls | |
cd tests | |
./test_hpo.sh -c minikube -o kruize/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 |