Skip to content

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

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

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

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: 76a98ac2e8eb94d2ef714039c2b8f365f937dedc # rev149 2025-01-25T12:09:32Z
- charm-repo: canonical/prometheus-k8s-operator
commit: 62cd2d9b8c3a528910ce12c553209817e1b7a889 # rev226 2024-12-19T16:01:25Z
- charm-repo: canonical/grafana-k8s-operator
commit: 3c8db2d5ca7106bb39b5745de44732053888e190 # rev135 2025-01-28T15:24:39Z
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
if: ${{ !(matrix.disabled) }}
run: tox -vve unit
- name: Run the charm's static analysis checks
if: ${{ !(matrix.disabled) }}
run: tox -vve static-charm