Merge pull request #45 from DataBiosphere/qi-publish #202
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
# This is workflow designed to test all supported apps in parallel | |
name: App Smoke Test | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "test" | |
test: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
# means we do not want a failure in a single app's smoketest to cause others to fail. Can be changed | |
fail-fast: false | |
# add new apps to be smoke tested to the array below | |
matrix: | |
app: [jupyter, ucsc-genome-browser, rstudio, cellxgene, cirrocumulus] | |
env: | |
APP_NAME: ${{ matrix.app }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out repo under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup data for tests and perform system installs | |
run: | | |
sudo apt-get install jq | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.28.1/yq_linux_amd64 -O /usr/bin/yq | |
sudo chmod +x /usr/bin/yq | |
# Note the `--driver=none`. It means that minikube will run on the existing vm ('bare metal') provided by github actions instead of a nested vm | |
# This is required as github actions does not support nested virtualization. See: https://github.com/actions/virtual-environments/issues/183https://github.com/actions/virtual-environments/issues/183 | |
# Unfortunately, this makes the smoke tests themselves incompatible with running locally, as mac does not support `--driver=none`, and it changes the mount syntax | |
# As such, the pod mount directory (specified in app.yaml) is sourced directly from the github actions file system. Hence the `sudo cp ...` line | |
- name: Minikube install and start | |
run : | | |
sudo apt-get install conntrack | |
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | |
sudo install minikube-linux-amd64 /usr/bin/minikube | |
sudo chmod +x /usr/bin/minikube | |
minikube start --no-vtx-check --driver=none --vm=true --kubernetes-version=v1.21.0 | |
sudo mkdir -p /data | |
sudo cp ./test/* /data | |
- name: Run smoke test on app | |
run: | | |
sudo echo "$(minikube ip) $(jq -r .hostname < ci-config.json)" | sudo tee -a /etc/hosts | |
./test/smoke-test.sh $APP_NAME |