-
Notifications
You must be signed in to change notification settings - Fork 10
91 lines (78 loc) · 2.28 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: ./charms/argo-controller
lint:
name: Lint Code
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v3
- run: |
sudo apt update
sudo apt install tox
- run: tox -vve argo-controller-lint
unit:
name: Unit Tests
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v3
- run: |
sudo apt update
sudo apt install tox
- run: tox -vve argo-controller-unit
terraform-checks:
name: Terraform
uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-checks.yaml@main
with:
charm-path: ./charms/argo-controller
integration:
name: Integration Test
runs-on: ubuntu-20.04
strategy:
matrix:
charm: [argo-controller]
steps:
- uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: 1.29-strict/stable
microk8s-addons: "dns storage rbac metallb:10.64.140.43-10.64.140.49"
juju-channel: 3.4/stable
charmcraft-channel: latest/candidate
- name: Build and test
working-directory: ./charms/${{ matrix.charm }}
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 -ljuju-app=${{ matrix.charm }}
if: failure()
- name: Get argo-controller operator logs
run: kubectl logs -n testing --tail 1000 -ljuju-operator=${{ matrix.charm }}
if: failure()