forked from canonical/operator
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (117 loc) · 5.16 KB
/
published-charms-tests.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
# To update the list of charms included here, run:
# python .github/update-published-charms-tests-workflow.py
name: Broad Charm Compatibility Tests
on:
schedule:
- cron: '0 1 25 * *'
workflow_dispatch:
jobs:
charm-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- charm-repo: canonical/content-cache-k8s-operator
- charm-repo: canonical/data-platform-libs
- charm-repo: canonical/dex-auth-operator
- charm-repo: canonical/discourse-k8s-operator
- charm-repo: canonical/grafana-agent-k8s-operator
- charm-repo: canonical/hardware-observer-operator
- charm-repo: canonical/identity-platform-login-ui-operator
- charm-repo: canonical/indico-operator
- charm-repo: canonical/jenkins-agent-k8s-operator
- charm-repo: canonical/jenkins-agent-operator
- charm-repo: canonical/kafka-operator
- charm-repo: canonical/livepatch-k8s-operator
- charm-repo: canonical/loki-k8s-operator
- charm-repo: canonical/manual-tls-certificates-operator
- charm-repo: canonical/mongodb-operator
- charm-repo: canonical/mysql-router-k8s-operator
- charm-repo: canonical/namecheap-lego-k8s-operator
- charm-repo: canonical/nginx-ingress-integrator-operator
- charm-repo: canonical/oathkeeper-operator
- charm-repo: canonical/oauth2-proxy-k8s-operator
- charm-repo: canonical/openfga-operator
- charm-repo: canonical/pgbouncer-k8s-operator
- charm-repo: canonical/ranger-k8s-operator
- charm-repo: canonical/route53-lego-k8s-operator
- charm-repo: canonical/s3-integrator
- charm-repo: canonical/saml-integrator-operator
- charm-repo: canonical/seldon-core-operator
- charm-repo: canonical/self-signed-certificates-operator
- charm-repo: canonical/smtp-integrator-operator
- charm-repo: canonical/superset-k8s-operator
- charm-repo: canonical/temporal-admin-k8s-operator
- charm-repo: canonical/temporal-k8s-operator
- charm-repo: canonical/temporal-ui-k8s-operator
- charm-repo: canonical/temporal-worker-k8s-operator
- charm-repo: canonical/traefik-k8s-operator
- charm-repo: canonical/trino-k8s-operator
- charm-repo: canonical/wordpress-k8s-operator
- charm-repo: canonical/zookeeper-operator
steps:
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.charm-repo }}
- name: Checkout the operator repository
uses: actions/checkout@v4
with:
path: myops
- name: Install patch dependencies
run: pip install poetry~=1.6
- name: Update 'ops' dependency in test charm to latest
run: |
rm -rf myops/test
if [ -e "test-requirements.txt" ]; then
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" test-requirements.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> test-requirements.txt
fi
if [ -e "requirements-charmcraft.txt" ]; then
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements-charmcraft.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements-charmcraft.txt
fi
if [ -e "requirements.txt" ]; then
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt
elif [ -e "poetry.lock" ]; then
sed -i -e "s/^ops[ ><=].*/ops = {path = \"myops\"}/" pyproject.toml
poetry lock --no-update
else
echo "Error: No requirements.txt or poetry.lock file found"
exit 1
fi
- name: Install dependencies
run: pip install tox~=4.2
- name: Run the charm's unit tests
run: tox -vve unit
charmcraft-profile-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- profile: machine
- profile: kubernetes
- profile: simple
steps:
- name: Install charmcraft
run: sudo snap install charmcraft --classic
- name: Charmcraft init
run: charmcraft init --profile=${{ matrix.profile }} --author=charm-tech
- name: Checkout the operator repository
uses: actions/checkout@v4
with:
path: myops
- name: Update 'ops' dependency in test charm to latest
run: |
rm -rf myops/test
if [ -e "requirements.txt" ]; then
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt
fi
- name: Install dependencies
run: pip install tox~=4.2
- name: Run the charm's unit tests
run: tox -vve unit