-
Notifications
You must be signed in to change notification settings - Fork 115
49 lines (42 loc) · 1.72 KB
/
db-charm-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
name: Data Charm Tests
on: [push, pull_request, workflow_call]
jobs:
db-charm-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- charm-repo: canonical/postgresql-operator
commit: 4feeaeee102cbf5e3dada3c05d44e0495ca68f9a # rev409 2024-05-21T12:52:24Z
- charm-repo: canonical/postgresql-k8s-operator
commit: 1a25c3929747beea7e78467b169b2b345b29d470 # 2024-05-21T12:40:19Z
- charm-repo: canonical/mysql-operator
commit: 19633f3e904d1c3296477b3df191d1ca265fc0d5 # rev234 2024-05-06T12:13:54Z
- charm-repo: canonical/mysql-k8s-operator
commit: 6c09910bc3bd88eb632793d08fa17340c6903cb2 # rev138 2024-05-01T18:08:13Z
steps:
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.charm-repo }}
ref: ${{ matrix.commit }}
- 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: |
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
else
sed -i -e "s/^ops[ ><=].*/ops = {path = \"myops\"}/" pyproject.toml
poetry lock
fi
- name: Install dependencies
run: pip install tox~=4.2
- name: Run the charm's unit tests
run: tox -vve unit