-
Notifications
You must be signed in to change notification settings - Fork 9
133 lines (130 loc) · 5.28 KB
/
workflow_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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Workflow test
on:
pull_request:
jobs:
simple:
uses: ./.github/workflows/test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-upload-charm/"
self-hosted-runner: false
simple-self-hosted:
uses: ./.github/workflows/test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-upload-charm/"
self-hosted-runner: true
self-hosted-runner-label: "edge"
integration:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-upload-charm/"
trivy-image-config: "tests/workflows/integration/test-upload-charm/trivy.yaml"
integration-juju3:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
identifier: test-upload
working-directory: "tests/workflows/integration/test-upload-charm/"
trivy-image-config: "tests/workflows/integration/test-upload-charm/trivy.yaml"
juju-channel: 3.3/stable
channel: 1.30-strict/stable
provider: microk8s
test-tox-env: "integration-juju3.1"
integration-artifact:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
identifier: test-upload-artifact
working-directory: "tests/workflows/integration/test-upload-charm/"
trivy-image-config: "tests/workflows/integration/test-upload-charm/trivy.yaml"
juju-channel: 3.3/stable
channel: 1.30-strict/stable
provider: microk8s
test-tox-env: "integration-juju3.1"
upload-image: artifact
microk8s-addons: "dns ingress rbac storage registry"
integration-self-hosted:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-upload-charm/"
trivy-image-config: "tests/workflows/integration/test-upload-charm/trivy.yaml"
self-hosted-runner: true
self-hosted-runner-label: "edge"
integration-rock:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-rock/"
trivy-image-config: "tests/workflows/integration/test-rock/trivy.yaml"
integration-rock-artifact:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-rock/"
upload-image: artifact
microk8s-addons: "dns ingress rbac storage registry"
trivy-image-config: "tests/workflows/integration/test-rock/trivy.yaml"
integration-craft:
uses: ./.github/workflows/integration_test.yaml
secrets: inherit
with:
working-directory: "tests/workflows/integration/test-rock/"
trivy-image-config: "tests/workflows/integration/test-rock/trivy.yaml"
charmcraft-repository: canonical/charmcraft
charmcraft-ref: main
rockcraft-repository: canonical/rockcraft
rockcraft-ref: main
publish:
uses: ./.github/workflows/publish_charm.yaml
secrets: inherit
needs: [ integration-juju3 ]
with:
identifier: test-upload
channel: latest/edge
integration-test-workflow-file: workflow_test.yaml
working-directory: tests/workflows/integration/test-upload-charm/
workflow-run-id: ${{ github.run_id }}
publish-artifact:
uses: ./.github/workflows/publish_charm.yaml
secrets: inherit
needs: [ publish, integration-artifact ]
with:
identifier: test-upload-artifact
channel: latest/edge
integration-test-workflow-file: workflow_test.yaml
working-directory: tests/workflows/integration/test-upload-charm/
workflow-run-id: ${{ github.run_id }}
check:
runs-on: ubuntu-latest
if: always() && !cancelled()
timeout-minutes: 5
needs:
- simple
- simple-self-hosted
- integration
- integration-juju3
- integration-artifact
- integration-self-hosted
- integration-rock
- integration-rock-artifact
- integration-craft
- publish
- publish-artifact
steps:
- run: |
[ '${{ needs.simple.result }}' = 'success' ] || (echo simple failed && false)
[ '${{ needs.simple-self-hosted.result }}' = 'success' ] || (echo simple-self-hosted failed && false)
[ '${{ needs.integration.result }}' = 'success' ] || (echo integration failed && false)
[ '${{ needs.integration-juju3.result }}' = 'success' ] || (echo integration-juju3 failed && false)
[ '${{ needs.integration-artifact.result }}' = 'success' ] || (echo integration-artifact failed && false)
[ '${{ needs.integration-self-hosted.result }}' = 'success' ] || (echo integration-self-hosted failed && false)
[ '${{ needs.integration-rock.result }}' = 'success' ] || (echo integration-rock failed && false)
[ '${{ needs.integration-rock-artifact.result }}' = 'success' ] || (echo integration-rock-artifact failed && false)
[ '${{ needs.integration-craft.result }}' = 'success' ] || (echo integration-craft failed && false)
[ '${{ needs.publish.result }}' != 'failure' ] || (echo publish failed && false)
[ '${{ needs.publish-artifact.result }}' != 'failure' ] || (echo publish failed && false)