-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (83 loc) · 2.54 KB
/
integrate.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
# reusable workflow triggered by other actions
name: CI
on:
workflow_call:
secrets:
CHARMCRAFT_CREDENTIALS:
required: true
jobs:
lib-check:
name: Check libraries
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check libs
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMCRAFT_CREDENTIALS }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
lint:
name: Lint Check
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install python3-pip tox
- name: Lint code
run: tox -e lint
unit:
name: Unit Test
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install python3-pip tox
- name: Run unit tests
run: tox -e unit
terraform-checks:
name: Terraform
uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-checks.yaml@main
with:
charm-path: .
integration:
name: Integration tests (microk8s)
runs-on: ubuntu-20.04
steps:
- name: Maximise GH runner space
uses: easimon/maximize-build-space@v7
with:
root-reserve-mb: 29696
remove-dotnet: 'true'
remove-haskell: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v2
- name: Setup operator environment
uses: charmed-kubernetes/[email protected]
with:
juju-channel: 3.4/stable
provider: microk8s
channel: 1.29-strict/stable
microk8s-addons: "dns hostpath-storage rbac metallb:10.64.140.43-10.64.140.49"
# Running with kubeflow model because of upstream issue https://github.com/kubeflow/kubeflow/issues/7283
- name: Run integration tests
run: sg snap_microk8s -c "tox -vve integration -- --model kubeflow"
# On failure, capture debugging resources
- name: Get all
run: kubectl get all -A
if: failure()
- name: Get juju status
run: juju status
if: failure()
- name: Get workload logs
run: kubectl logs --tail 100 -ntesting -lapp.kubernetes.io/name=mlflow-server
if: failure()
- name: Get operator logs
run: kubectl logs --tail 100 -ntesting -loperator.juju.is/name=mlflow-server
if: failure()