Skip to content

feat: parse JUJU_* env in one place #1669

feat: parse JUJU_* env in one place

feat: parse JUJU_* env in one place #1669

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: da7ab85806174545930e71da6b5b1285b53fb41f # 2024-07-24T19:54:11Z
- charm-repo: canonical/postgresql-k8s-operator
commit: f6b6e2a6b86b25d071d719d3f0a3bd121d42d439 # 2024-07-24T19:48:55Z
- charm-repo: canonical/mysql-operator
commit: 643084e9e13089d1112389a4439f33ba3f035894 # rev257 2024-07-23T01:22:29Z
- charm-repo: canonical/mysql-k8s-operator
commit: 00881dd574d63c778c05fa0c111a9c336154680c # 2024-07-24T19:37:27Z
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