forked from canonical/operator
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 1 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
name: Data Platform Charm Tests
on: [push, pull_request, workflow_call]
jobs:
db-charm-tests:
runs-on: ubuntu-latest
strategy:
matrix:
charm-repo:
- "canonical/postgresql-operator"
- "canonical/postgresql-k8s-operator"
- "canonical/mysql-operator"
- "canonical/mysql-k8s-operator"
steps:
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v3
with:
repository: ${{ matrix.charm-repo }}
- name: Update 'ops' dependency in test charm to latest
run: |
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
- name: Install dependencies
run: pip install tox==4.2.8
- name: Run the charm's unit tests
run: tox -vve unit
- name: Run the charm's static analysis checks
run: tox -vve static-charm