-
Notifications
You must be signed in to change notification settings - Fork 2
91 lines (77 loc) · 2.19 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
# reusable workflow triggered by other actions
name: CI
on:
workflow_call:
secrets:
CHARMCRAFT_CREDENTIALS:
required: true
jobs:
lib-check:
name: Check libraries
uses: canonical/charmed-kubeflow-workflows/.github/workflows/_quality-checks.yaml@main
secrets: inherit
with:
charm-path: "."
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: |
set -eux
sudo apt update
sudo apt install tox
- name: Lint code
run: tox -vve lint
unit:
name: Unit Tests
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -vve unit
terraform-checks:
name: Terraform
uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-checks.yaml@main
with:
charm-path: .
integration:
name: Integration Tests
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: 1.25-strict/stable
juju-channel: 3.6/stable
microk8s-addons: "dns storage rbac metallb:10.64.140.43-10.64.140.49"
charmcraft-channel: 3.x/stable
- name: Test
run: sg snap_microk8s -c "tox -vve integration -- --model testing"
# On failure, capture debugging resources
- name: Get all
run: kubectl get all -A
if: failure()
- name: Describe deployments
run: kubectl describe deployments -A
if: failure()
- name: Describe replicasets
run: kubectl describe replicasets -A
if: failure()
- name: Get juju status
run: juju status
if: failure()
- name: Get application logs
run: kubectl logs -n testing --tail 1000 -lapp.kubernetes.io/name=mlmd
if: failure()
- name: Get application operator logs
run: kubectl logs -n testing --tail 1000 -ljuju-operator=mlmd
if: failure()