Skip to content

ci: add a workflow that runs the TIOBE quality checks #1661

ci: add a workflow that runs the TIOBE quality checks

ci: add a workflow that runs the TIOBE quality checks #1661

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: 78eeb2b29a495c1f5965c8040457882351c6fde1 # 2024-07-19T14:03:33Z
- charm-repo: canonical/postgresql-k8s-operator
commit: fd4d83ada5c44323847cc17082cd30d92a7793d6 # 2024-07-19T12:21:31Z
- charm-repo: canonical/mysql-operator
commit: 5327a7af574bc92ce47f48ce2b907a16b5eb8484 # 2024-07-19T11:51:03Z
- charm-repo: canonical/mysql-k8s-operator
commit: ee7b04c8609d5f1698b2a90448c070f8a2595daf # 2024-07-19T11:51:43Z
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