forked from canonical/operator
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.77 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
50
51
52
53
54
name: Data Charm Tests
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
db-charm-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- charm-repo: canonical/postgresql-operator
commit: 564932c23370b9848b19c4f136673f972050787b # 2024-11-26T15:33:51Z
- charm-repo: canonical/postgresql-k8s-operator
commit: 97c77472a661d4207c458ba7ef92cbb78baf661b # rev467 rev466 2024-11-26T10:45:43Z
- charm-repo: canonical/mysql-operator
commit: a235a9918a50832005f66d9925c086a07f22f88e # rev308 rev307 2024-11-26T14:03:28Z
- charm-repo: canonical/mysql-k8s-operator
commit: 30dd0d4a16db7bb61cd511784ad9a162b988efb2 # 2024-11-19T13:36:57Z
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 --no-update
fi
- name: Install dependencies
run: pip install tox~=4.2
- name: Run the charm's unit tests
run: tox -vve unit