-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (103 loc) · 4.06 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: test metrics-operator
on:
pull_request: []
jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup black linter
run: conda create --quiet --name black pyflakes
- name: Check Spelling
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
with:
files: ./README.md ./config/samples ./docs/*.md ./docs/*/*.md
- name: Lint and format Python code
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate black
pip install -r .github/dev-requirements.txt
pre-commit run --all-files
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: fmt check
run: make fmt
# These aren't written yet
- name: Run Unit tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make test
# Ensure build-config is the same as the one we have
- name: Check Updated metrics-operator.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp examples/dist/metrics-operator.yaml /tmp/metrics-operator.yaml
make build-config
diff examples/dist/metrics-operator.yaml /tmp/metrics-operator.yaml
- name: Check Updated metrics.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp docs/_static/data/metrics.json /tmp/metrics.json
make docs-data
diff docs/_static/data/metrics.json /tmp/metrics.json
test-metrics:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [["app-lammps", "ghcr.io/converged-computing/metric-lammps:latest", 120],
#[["perf-hello-world", "ghcr.io/converged-computing/metric-sysstat:latest", 60],
#["io-host-volume", "ghcr.io/converged-computing/metric-sysstat:latest", 60],
#["io-fio", "ghcr.io/converged-computing/metric-fio:latest", 120],
#["io-ior", "ghcr.io/converged-computing/metric-ior:latest", 120],
## ["network-chatterbug", "ghcr.io/converged-computing/metric-chatterbug:latest", 120],
#["app-nekbone", "ghcr.io/converged-computing/metric-nekbone:latest", 120],
# ["app-ldms", "ghcr.io/converged-computing/metric-ovis-hpc:latest", 120],
["app-amg", "ghcr.io/converged-computing/metric-amg:latest", 120]]
#["app-kripke", "ghcr.io/converged-computing/metric-kripke:latest", 120],
#["app-pennant", "ghcr.io/converged-computing/metric-pennant:latest", 120],
#["app-bdas", "ghcr.io/converged-computing/metric-bdas:latest", 120],
#["app-quicksilver", "ghcr.io/converged-computing/metric-quicksilver:latest", 120],
steps:
- name: Clone the code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: Start minikube
uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9
- name: Install JobSet
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
VERSION=v0.2.0
kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml
sleep 5
- 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: Test ${{ matrix.test[0] }}
env:
name: ${{ matrix.test[0] }}
jobtime: ${{ matrix.test[2] }}
run: /bin/bash ./script/test.sh ${name} ${jobtime}