Skip to content

Update K8s Github Actions test #5

Update K8s Github Actions test

Update K8s Github Actions test #5

Workflow file for this run

# Optionally debug via SSH
# Ref: https://fleetdm.com/engineering/tips-for-github-actions-usability
#
# To use this step uncomment and place anywhere in the build steps. The build will pause on this step and
# output a ssh address associated with the Github action worker. Helpful for debugging build steps and
# and intermediary files/artifacts.
#
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
name: K8s Test
on:
push:
pull_request:
jobs:
build:
uses: ./.github/workflows/build.yml
test:
# needs: build
runs-on: ubuntu-latest
steps:
- name: Install k3d
run: |
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster create test-cluster
helm repo add ohsu https://ohsu-comp-bio.github.io/helm-charts
helm upgrade --install funnel ohsu/funnel
kubectl wait --for=condition=Ready pod -l app=funnel
kubectl port-forward svc/funnel 8000:8000 &
- uses: actions/download-artifact@v4
with:
name: funnel
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Submit Task
run: |
export PATH="$PATH:$(pwd)"
chmod +x funnel
funnel examples hello-world > hello-world.json
funnel task create hello-world.json
- name: Wait for task to complete
run: |
export PATH="$PATH:$(pwd)"
ID=$(funnel task create hello-world.json)
kubectl wait --for=condition=Succeeded pod -l job-name=$ID
# Exits 0 if the task is complete, otherwise exits 1
funnel task list $ID | grep -q COMPLETE