-
Notifications
You must be signed in to change notification settings - Fork 121
46 lines (39 loc) · 1.53 KB
/
observability-charm-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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: ddd6c62cc30689b3d353c714b020cb309e59d00c # 2024-11-27T09:11:44Z
- charm-repo: canonical/prometheus-k8s-operator
commit: 0953ac0c87dc8912ed935f9130f21940923461e8 # rev218 2024-11-27T10:35:42Z
disabled: true # Waiting for an upstream PR: https://github.com/canonical/prometheus-k8s-operator/pull/639
- charm-repo: canonical/grafana-k8s-operator
commit: e821e40ac134468ece69c68ee9bc117b27c5f600 # 2024-11-27T11:34:26Z
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