Skip to content

ci: periodically run the unit tests of all GitHub-hosted published charms #2970

ci: periodically run the unit tests of all GitHub-hosted published charms

ci: periodically run the unit tests of all GitHub-hosted published charms #2970

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: 8b8c9a1d1b1352fd0c797ea37878e64c65a0f4ef # rev127 2024-07-17T12:10:15Z
- charm-repo: canonical/prometheus-k8s-operator
commit: 76e80816dc67958fa8be6752ef99b34371e84f87 # rev210 2024-07-16T13:35:14Z
- charm-repo: canonical/grafana-k8s-operator
commit: a2688ade7af5d0dc1607c1ac560faf065966f063 # rev117 2024-06-18T22:02: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