Skip to content

fix: use StatusBase.__init_subclass__ instead of decorator to avoid o… #4

fix: use StatusBase.__init_subclass__ instead of decorator to avoid o…

fix: use StatusBase.__init_subclass__ instead of decorator to avoid o… #4

name: Observability Charm Tests
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
o11y-charm-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- charm-repo: canonical/alertmanager-k8s-operator
commit: 4b2f567c43bc67e9d1fe24f018ba186dcd0396ed # 2024-08-28T11:32:28Z
# Waiting for an upstream PR:
# https://github.com/canonical/prometheus-k8s-operator/pull/639
#- charm-repo: canonical/prometheus-k8s-operator
# commit: 7518ec8343941ca91248614fd8f2d50fdd9e068c # rev135 2024-09-06T12:10:02Z
# Waiting for an upstream PR:
# https://github.com/canonical/grafana-k8s-operator/pull/347
#- charm-repo: canonical/grafana-k8s-operator
# commit: 1bd9e7fd96a9f5a91443e5932667c58a92c1ce5e # 2024-09-03T14:57:42Z
steps:
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.charm-repo }}
ref: ${{ matrix.commit }}
- 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
- name: Run the charm's unit tests
run: tox -vve unit
- name: Run the charm's static analysis checks
run: tox -vve static-charm