Skip to content

raised java version to 21 in ci workflow #6

raised java version to 21 in ci workflow

raised java version to 21 in ci workflow #6

Workflow file for this run

name: CI
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "21"
cache: "maven"
- name: Run mvn clean verify
run: mvn --batch-mode clean verify -DskipIntegrationTests
integration:
# Run on our custom runner, as the default runner doesn't offer enough resources.
# Attention: paid runner, $0.064 per minute at the time of writing.
# Not usable outside of this repo.
runs-on: LinuxX64_16-cores_64GB
# Set a max timeout of 20 minutes.
# This way, we can control the cost of the runner.
timeout-minutes: 20
# Only run on pull requests to main and on pushes to main.
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
# Run only if the unit-test job is successful
needs: unit
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "21"
cache: "maven"
- name: Install Kustomize
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/\
kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/
kustomize version
- name: Start minikube
uses: medyagh/setup-minikube@master
with:
cpus: 12
memory: 48G
- name: Test cluster connection
run: kubectl get pods -A
- name: Setup Testing Environment
run: |
# Export minikube IP to KUBEFLOW_HOST
export KUBEFLOW_HOST=$(minikube ip)
echo "KUBEFLOW_HOST=$KUBEFLOW_HOST"
# replace issuer in oauth2-proxy config
envsubst < ./src/test/resources/kubeflow-environment/oauth2_proxy.yml > ./src/test/resources/kubeflow-environment/oauth2_proxy2.yml
mv ./src/test/resources/kubeflow-environment/oauth2_proxy2.yml ./src/test/resources/kubeflow-environment/oauth2_proxy.yml
# setup environment
timeout 5m bash -c \
'until \
kustomize build ./src/test/resources/kubeflow-environment \
| kubectl apply -f -; \
do echo "Retrying to apply resources"; sleep 10; done'
- name: Wait for deployments to be ready
run: |
kubectl wait --for=condition=available --timeout=300s \
deployment --all --all-namespaces
# Wait for namespace to appear
timeout 5m bash -c \
'until kubectl get namespace kubeflow; \
do echo "Retrying to get namespace"; sleep 10; done'
# Wait for all deployments again, now that the namespace is there
kubectl wait --for=condition=available --timeout=300s \
deployment --all --all-namespaces
- name: Run mvn clean integration-test
run: |
# Export minikube IP to KUBEFLOW_HOST
export KUBEFLOW_HOST=$(minikube ip)
echo "KUBEFLOW_HOST=$KUBEFLOW_HOST"
mvn --batch-mode clean verify -DskipUnitTests
- name: Print deployment descriptions on failure
if: failure()
run: |
kubectl get deployments -A
kubectl describe deployments -A
kubectl get pods -A
kubectl describe pods -A