<commit_before>name: CI
on: [pull_request]
jobs:
  # Runs before all other jobs
  # builds the minikube binaries 
  build_minikube:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: build binaries
      run : |
        make minikube-linux-amd64
        make e2e-linux-amd64
        pwd
        ls -lah
        cp -r test/integration/testdata ./out
        ls -lah ./out
        whoami
        echo github ref $GITHUB_REF
        echo workflow $GITHUB_WORKFLOW
        echo home $HOME
        echo event name $GITHUB_EVENT_NAME
        echo workspace $GITHUB_WORKSPACE
        echo "end of debug stuff"
    - uses: actions/upload-artifact@v1
      with:
        name: minikube_binaries
        path: out
  unit_test:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "unit_test"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: install libvirt
      run : | 
        sudo apt-get update
        sudo apt-get install -y libvirt-dev
    - name: unit test
      run : make test
      continue-on-error: false
  # Run the following integration tests after the build_minikube
  # They will run in parallel and use the binaries in previous step
  docker_ubuntu_16_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-16.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        pwd
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: docker_ubuntu_16_04
        path: report
  docker_ubuntu_18_04:
    runs-on: ubuntu-18.04
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_18_04"
      COMMIT_STATUS: ""
    needs: [build_minikube]
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: docker_ubuntu_18_04
        path: report
  none_ubuntu16_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-16.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah        
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: none_ubuntu16_04
        path: report
  none_ubuntu18_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_18_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh    
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah        
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: none_ubuntu16_04
        path: report
  podman_ubuntu_18_04:
      needs: [build_minikube]
      env:
        TIME_ELAPSED: time
        JOB_NAME: "Podman_Ubuntu_18_04"
        COMMIT_STATUS: ""
      runs-on: ubuntu-18.04
      steps:
      - name: install podman
        run: |
          . /etc/os-release
          sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
          wget -q https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
          sudo apt-key add - < Release.key || true
          sudo apt-get update -qq
          sudo apt-get -qq -y install podman
          sudo podman version || true 
          sudo podman info || true 
      - name: install gopogh
        run: |
          curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
          sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
      - name: download binaries
        uses: actions/download-artifact@v1
        with:
          name: minikube_binaries
      - name: run integration test
        continue-on-error: true
        shell: bash
        run: |
          cd minikube_binaries
          mkdir -p report
          mkdir -p testhome
          ls -lah
          chmod a+x e2e-*
          chmod a+x minikube-*
          ls -lah
          START_TIME=$(date -u +%s)
          KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
          END_TIME=$(date -u +%s)
          TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
          min=$((${TIME_ELAPSED}/60))
          sec=$((${TIME_ELAPSED}%60))
          TIME_ELAPSED="${min} min $sec seconds "
          echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
      - name: generate html report
        run: |
          pwd
          cd minikube_binaries
          export PATH=${PATH}:`go env GOPATH`/bin
          go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
          STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
          echo status: ${STAT}
          COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
          echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
      - name: The End Result
        run: |
          echo time elapsed is ${TIME_ELAPSED}
          echo END RESULT IS ${COMMIT_STATUS}
      - uses: actions/upload-artifact@v1
        with:
          name: podman_ubuntu_18_04
          path: report  
  # After all 4 integration tests finished 
  # collect all the reports and upload
  upload_all_reports:
    needs: [docker_ubuntu_16_04,docker_ubuntu_18_04,none_ubuntu16_04,none_ubuntu18_04,podman_ubuntu_18_04]
    runs-on: ubuntu-18.04
    steps:
    - name: download results docker_ubuntu_16_04
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_16_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah docker_ubuntu_16_04
        mkdir -p all_reports
        cp -r docker_ubuntu_16_04 ./all_reports/
    - name: download results docker_ubuntu_18_04
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah docker_ubuntu_18_04
        mkdir -p all_reports
        cp -r docker_ubuntu_18_04 ./all_reports/
    - name: download results none_ubuntu16_04
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu16_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah none_ubuntu16_04
        mkdir -p all_reports
        cp -r none_ubuntu16_04 ./all_reports/
    - name: download results none_ubuntu18_04
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah none_ubuntu18_04
        mkdir -p all_reports
        cp -r none_ubuntu18_04 ./all_reports/
    - name: download results podman_ubuntu_18_04
      uses: actions/download-artifact@v1
      with:
        name: podman_ubuntu_18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah podman_ubuntu_18_04
        mkdir -p all_reports
        cp -r podman_ubuntu_18_04 ./all_reports/
    - uses: actions/upload-artifact@v1
      with:
        name: all_reports
        path: all_reports
<commit_msg>only uni test in github action<commit_after>name: CI
on: [pull_request]
jobs:
  # Runs before all other jobs
  # builds the minikube binaries 
  build_minikube:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: build binaries
      run : |
        make minikube-linux-amd64
        make e2e-linux-amd64
        pwd
        ls -lah
        cp -r test/integration/testdata ./out
        ls -lah ./out
        whoami
        echo github ref $GITHUB_REF
        echo workflow $GITHUB_WORKFLOW
        echo home $HOME
        echo event name $GITHUB_EVENT_NAME
        echo workspace $GITHUB_WORKSPACE
        echo "end of debug stuff"
    - uses: actions/upload-artifact@v1
      with:
        name: minikube_binaries
        path: out
  unit_test:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "unit_test"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: install libvirt
      run : | 
        sudo apt-get update
        sudo apt-get install -y libvirt-dev
    - name: only unit test
      run : |
        export TESTSUITE" = "unittest"
        make test
        continue-on-error: false
  # Run the following integration tests after the build_minikube
  # They will run in parallel and use the binaries in previous step
  docker_ubuntu_16_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-16.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        pwd
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: docker_ubuntu_16_04
        path: report
  docker_ubuntu_18_04:
    runs-on: ubuntu-18.04
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_18_04"
      COMMIT_STATUS: ""
    needs: [build_minikube]
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: docker_ubuntu_18_04
        path: report
  none_ubuntu16_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_16_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-16.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah        
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: none_ubuntu16_04
        path: report
  none_ubuntu18_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_18_04"
      COMMIT_STATUS: ""
    runs-on: ubuntu-18.04
    steps:
    - name: install gopogh
      run: |
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh    
    - name: download binaries
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
    - name: run integration test
      continue-on-error: true
      shell: bash
      run: |
        pwd
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        ls -lah
        chmod a+x e2e-*
        chmod a+x minikube-*
        ls -lah        
        START_TIME=$(date -u +%s)
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
        END_TIME=$(date -u +%s)
        TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
    - name: generate gopogh report
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
        echo status: ${STAT}
        COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
        echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
    - name: The End Result
      run: |
        echo time elapsed is ${TIME_ELAPSED}
        echo END RESULT IS ${COMMIT_STATUS}
    - uses: actions/upload-artifact@v1
      with:
        name: none_ubuntu16_04
        path: report
  podman_ubuntu_18_04:
      needs: [build_minikube]
      env:
        TIME_ELAPSED: time
        JOB_NAME: "Podman_Ubuntu_18_04"
        COMMIT_STATUS: ""
      runs-on: ubuntu-18.04
      steps:
      - name: install podman
        run: |
          . /etc/os-release
          sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
          wget -q https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
          sudo apt-key add - < Release.key || true
          sudo apt-get update -qq
          sudo apt-get -qq -y install podman
          sudo podman version || true 
          sudo podman info || true 
      - name: install gopogh
        run: |
          curl -LO https://github.com/medyagh/gopogh/releases/download/v0.0.22/gopogh-linux-amd64
          sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
      - name: download binaries
        uses: actions/download-artifact@v1
        with:
          name: minikube_binaries
      - name: run integration test
        continue-on-error: true
        shell: bash
        run: |
          cd minikube_binaries
          mkdir -p report
          mkdir -p testhome
          ls -lah
          chmod a+x e2e-*
          chmod a+x minikube-*
          ls -lah
          START_TIME=$(date -u +%s)
          KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
          END_TIME=$(date -u +%s)
          TIME_ELAPSED=$(($END_TIME-$START_TIME)) 
          min=$((${TIME_ELAPSED}/60))
          sec=$((${TIME_ELAPSED}%60))
          TIME_ELAPSED="${min} min $sec seconds "
          echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
      - name: generate html report
        run: |
          pwd
          cd minikube_binaries
          export PATH=${PATH}:`go env GOPATH`/bin
          go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
          STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name " $GITHUB_REF" -repo "${JOB_NAME} ${GITHUB_REF} ${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
          echo status: ${STAT}
          COMMIT_STATUS="${JOB_NAME} : Completed with ${STAT} in ${TIME_ELAPSED}"
          echo ::set-env name=COMMIT_STATUS::${COMMIT_STATUS}
      - name: The End Result
        run: |
          echo time elapsed is ${TIME_ELAPSED}
          echo END RESULT IS ${COMMIT_STATUS}
      - uses: actions/upload-artifact@v1
        with:
          name: podman_ubuntu_18_04
          path: report  
  # After all 4 integration tests finished 
  # collect all the reports and upload
  upload_all_reports:
    needs: [docker_ubuntu_16_04,docker_ubuntu_18_04,none_ubuntu16_04,none_ubuntu18_04,podman_ubuntu_18_04]
    runs-on: ubuntu-18.04
    steps:
    - name: download results docker_ubuntu_16_04
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_16_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah docker_ubuntu_16_04
        mkdir -p all_reports
        cp -r docker_ubuntu_16_04 ./all_reports/
    - name: download results docker_ubuntu_18_04
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah docker_ubuntu_18_04
        mkdir -p all_reports
        cp -r docker_ubuntu_18_04 ./all_reports/
    - name: download results none_ubuntu16_04
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu16_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah none_ubuntu16_04
        mkdir -p all_reports
        cp -r none_ubuntu16_04 ./all_reports/
    - name: download results none_ubuntu18_04
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah none_ubuntu18_04
        mkdir -p all_reports
        cp -r none_ubuntu18_04 ./all_reports/
    - name: download results podman_ubuntu_18_04
      uses: actions/download-artifact@v1
      with:
        name: podman_ubuntu_18_04
    - name: cp to all_report
      shell: bash
      run: |
        pwd
        ls -lah
        ls -lah podman_ubuntu_18_04
        mkdir -p all_reports
        cp -r podman_ubuntu_18_04 ./all_reports/
    - uses: actions/upload-artifact@v1
      with:
        name: all_reports
        path: all_reports

{'fraction_non_alphanumeric': 0.11549602971747946, 'fraction_numerical': 0.02290154380942644, 'mean_word_length': 2.1833369494467347, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3918764', 'n_tokens_mistral': 10954, 'n_tokens_neox': 9975, 'n_words': 2205}