custom: add support for custom container #153
Workflow file for this run
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
name: python metrics-operator | |
on: | |
pull_request: [] | |
jobs: | |
test-python: | |
name: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
# Tests in Python examples/python/run-metric.py | |
matrix: | |
test: [["perf-sysstat", "ghcr.io/converged-computing/metric-sysstat:latest", 60, ""], # performance test | |
["io-host-volume", "ghcr.io/converged-computing/metric-sysstat:latest", 60, ""], # storage test | |
["app-amg", "ghcr.io/converged-computing/metric-amg:latest", 60, "--iter 1"], # standalone app test | |
["app-lammps", "ghcr.io/converged-computing/metric-lammps:latest", 60, "--iter 1"]] # standalone app test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
run: conda create --quiet --name mo black | |
- name: Install Library | |
run: | | |
export PATH="/usr/share/miniconda/bin:$PATH" | |
source activate mo | |
cd sdk/python/v1alpha2 | |
pip install . | |
pip install seaborn pandas | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.22 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9 | |
- name: Pull Docker Containers to MiniKube | |
env: | |
container: ${{ matrix.test[1] }} | |
test: ${{ matrix[0] }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export SHELL=/bin/bash | |
eval $(minikube -p minikube docker-env) | |
minikube ssh docker pull ${container} | |
make deploy-local | |
minikube image load ghcr.io/converged-computing/metrics-operator:test | |
kubectl apply -f examples/dist/metrics-operator-local.yaml | |
- name: Install JobSet | |
run: | | |
VERSION=v0.2.0 | |
kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml | |
- name: Python Test ${{ matrix.test[0] }} | |
env: | |
name: ${{ matrix.test[0] }} | |
jobtime: ${{ matrix.test[2] }} | |
args: ${{ matrix.test[3] }} | |
run: | | |
export PATH="/usr/share/miniconda/bin:$PATH" | |
source activate mo | |
python ./examples/python/${name}/run-metric.py --sleep ${jobtime} --test ${args} |