-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (66 loc) · 2.29 KB
/
integration_test.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
name: Integration tests
on:
pull_request:
workflow_call:
jobs:
integration-test-microk8s:
name: Integration tests (microk8s)
strategy:
fail-fast: false
matrix:
tox-environments:
- integration-charm
- integration-scaling
- integration-upgrades
- integration-policy
- integration-usersync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
juju-channel: 3.1/stable
provider: microk8s
microk8s-addons: "ingress storage dns rbac registry"
channel: 1.25-strict/stable
- name: Run integration tests
run: tox -e ${{ matrix.tox-environments }}
integration-test-cross-controller:
name: Integration tests (microk8s & lxd)
strategy:
matrix:
tox-environments:
- integration-opensearch
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup K8s environment
uses: charmed-kubernetes/actions-operator@main
with:
juju-channel: 3.1/stable
provider: microk8s
microk8s-addons: "ingress storage dns rbac registry"
channel: 1.25-strict/stable
- name: Save K8s controller name
id: k8s-controller
run: echo "name=$CONTROLLER_NAME" >> $GITHUB_OUTPUT
- name: Setup LXD environment
uses: charmed-kubernetes/actions-operator@main
with:
juju-channel: 3.0/stable
provider: lxd
- name: Save LXD controller name
id: lxd-controller
run: echo "name=$CONTROLLER_NAME" >> $GITHUB_OUTPUT
- name: Run integration tests
run: tox -e ${{ matrix.tox-environments }}
env:
K8S_CONTROLLER: ${{ steps.k8s-controller.outputs.name }}
LXD_CONTROLLER: ${{ steps.lxd-controller.outputs.name }}
- name: Dump debug log
if: failure()
run: for ctl in $(juju controllers --format json | jq -r '.controllers | keys[]'); do for mdl in $(juju models --format json | jq -r '.models[].name' | grep -v "admin/controller"); do juju debug-log -m $ctl:$mdl --replay --ms --no-tail; done; done || true
shell: bash