-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (53 loc) · 1.62 KB
/
check.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
47
48
49
50
51
52
53
54
55
56
57
name: Check workflow running linter, unit and functional tests
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
branches: [master, main]
paths-ignore:
- "**.md"
- "**.rst"
jobs:
lint-unit:
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
with:
python-version: ${{ matrix.python-version }}
tox-version: "<4"
promtool:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
# prometheus snap comes pre-packaged with promtool
- name: Install prometheus snap
run: sudo snap install prometheus
- name: Check validity of prometheus alert rules
run: |
promtool check rules src/prometheus_alert_rules/*.yaml
- name: Run unit tests for prometheus alert rules
run: |
promtool test rules tests/unit/test_alert_rules/*.yaml
func:
uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2
needs: [lint-unit, promtool]
strategy:
fail-fast: false
matrix:
include:
- juju-channel: "2.9/stable"
command: "FUNC_ARGS='--series focal' make functional"
- juju-channel: "3.1/stable"
command: "FUNC_ARGS='--series jammy' make functional31"
with:
command: ${{ matrix.command }}
juju-channel: ${{ matrix.juju-channel }}
nested-containers: false
provider: "lxd"
python-version: "3.10"
timeout-minutes: 120
tox-version: "<4"