Skip to content

Integration test

Integration test #819

name: Integration test
on:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
integration_test:
strategy:
matrix:
testConfig:
- expectModelServer: false
- expectModelServer: true
extraHelmFlags: '-f ci/model-server-enabled-values.yaml'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./chart/kepler
steps:
- uses: actions/[email protected]
- name: use kepler action for kind cluster build
uses: sustainable-computing-io/[email protected]
with:
cluster_provider: kind
local_dev_cluster_version: v0.0.9
- name: install helm
uses: azure/setup-helm@v4
- name: helm lint
run: |
helm lint . --debug
- name: deploy kepler using helm chart
run: |
tree -a
helm install kepler . --values values.yaml --create-namespace --namespace kepler --dry-run --debug ${{ matrix.testConfig.extraHelmFlags }}
helm install kepler . --values values.yaml --create-namespace --namespace kepler --debug ${{ matrix.testConfig.extraHelmFlags }}
- name: test if kepler is alive
run: |
echo "Waiting for kepler pods to become ready"
kubectl rollout status daemonset,deployment --namespace kepler --timeout 120s
kubectl logs $(kubectl -n kepler get pods -l app.kubernetes.io/component=exporter -oname) -n kepler
kubectl get all -n kepler
- name: test model server
if: matrix.testConfig.expectModelServer
run: |
# if the model-server configuration is correct the kepler pods should use the model served through the Estimator Sidecar
kubectl logs $(kubectl -n kepler get pods -l app.kubernetes.io/component=exporter -oname) -n kepler | grep 'Using the EstimatorSidecar/AbsPower Power Model to estimate Node Component Power'