Skip to content

fix: require today's ops for today's ops-scenario #2330

fix: require today's ops for today's ops-scenario

fix: require today's ops for today's ops-scenario #2330

Workflow file for this run

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: 1872cc713bc058f4cec768242640361c1f2099a3 # 2025-01-28T15:07:11Z
- charm-repo: canonical/postgresql-k8s-operator
commit: 2b75c1e50de640708e0c9f0cbbeef7776974c725 # 2025-01-28T15:07:14Z
- charm-repo: canonical/mysql-operator
commit: 5507e955f8847ad3d2fb16a42e0ddf8046548a07 # 2025-01-28T19:25:35Z
- charm-repo: canonical/mysql-k8s-operator
commit: e1be970a14a71ee4c9cc078d63661b75defe4cdf # 2025-01-28T19:25:58Z
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~=2.0
- 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