Skip to content

chore: update charm pins (#1517) #2225

chore: update charm pins (#1517)

chore: update charm pins (#1517) #2225

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: d6aa178cdd5655c83a96cb638e319f1b549795db # 2024-12-24T17:48:41Z
- charm-repo: canonical/postgresql-k8s-operator
commit: 0a1c1493c30e77960d977bd79cf115eb05a333ef # rev473 rev472 2024-12-19T08:37:04Z
- charm-repo: canonical/mysql-operator
commit: e645946b88ab7f20c39f8ca8225f8c0fcd6f9e75 # rev325 rev324 2024-12-19T15:06:21Z
- charm-repo: canonical/mysql-k8s-operator
commit: cec46a0bbf972a6b685d599544030d6047c3978d # 2024-12-19T15:06:31Z
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