generated from canonical/is-charms-template-repo
-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (49 loc) · 1.4 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
name: Integration tests
on:
pull_request:
jobs:
extra-args:
runs-on: ubuntu-latest
outputs:
args: ${{ steps.flags.outputs.args }}
steps:
- name: Determine extra args
id: flags
env:
TITLE: ${{ github.event.pull_request.title }}
JOB: ${{ github.job }}
WORKFLOW: ${{ github.workflow }}
run: |
EXTRA_ARGS="--crash-dump=on-failure"
if [[ "$TITLE" == *"[COS]"* ]]; then
EXTRA_ARGS="$EXTRA_ARGS --cos"
fi
echo "args=$EXTRA_ARGS" >> "$GITHUB_OUTPUT"
build-all-charms:
needs: [extra-args]
strategy:
matrix:
path:
- "./charms/worker/k8s/"
- "./charms/worker/"
uses: ./.github/workflows/build-charm.yaml
with:
working-directory: ${{ matrix.path }}
integration-tests:
uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main
needs: [build-all-charms, extra-args]
strategy:
matrix:
suite: ["k8s", "etcd"]
secrets: inherit
with:
provider: lxd
juju-channel: 3.3/stable
extra-arguments: ${{needs.extra-args.outputs.args}} -k test_${{ matrix.suite }}
load-test-enabled: false
zap-enabled: false
trivy-fs-enabled: true
trivy-image-config: "trivy.yaml"
tmate-debug: true
test-timeout: 120
test-tox-env: integration-${{ matrix.suite }}