Skip to content

feat: ops eval hook #3186

feat: ops eval hook

feat: ops eval hook #3186

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: fe233592f9324a6cf4aa9dbc71577ee170cf9eb3 # rev138 2024-10-18T12:11:02Z
# 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
- charm-repo: canonical/grafana-k8s-operator
commit: 07a52a65f272e115ab786f30cdb3b53be6b34bb7
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