From 24e85f2fadcf0a406ec9b4f76562c85f026eb50f Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Wed, 27 Mar 2024 12:39:35 +0000 Subject: [PATCH] Test pint ci on gh --- .github/pint/pint.hcl | 5 +++++ .github/pint/rules/1.yml | 4 ++-- .github/pint/rules/2.yaml | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/pint/pint.hcl b/.github/pint/pint.hcl index bee0f6a6..9e77e25c 100644 --- a/.github/pint/pint.hcl +++ b/.github/pint/pint.hcl @@ -1,3 +1,8 @@ ci { include = [".github/pint/rules/.*"] } +repository { + github { + maxComments = 1 + } +} diff --git a/.github/pint/rules/1.yml b/.github/pint/rules/1.yml index 61824c9c..44651550 100644 --- a/.github/pint/rules/1.yml +++ b/.github/pint/rules/1.yml @@ -3,10 +3,10 @@ groups: rules: - alert: Service Is Down expr: up == 0 - for: 0s + for: 0m - alert: Service Is Down expr: up{job="abc"} == 0 - alert: Everything Is Down - expr: up:sum == 0 + expr: up:count == 0 diff --git a/.github/pint/rules/2.yaml b/.github/pint/rules/2.yaml index 6e440eb6..4db08251 100644 --- a/.github/pint/rules/2.yaml +++ b/.github/pint/rules/2.yaml @@ -1,5 +1,5 @@ groups: - name: test rules: - - record: up:sum - expr: sum(up) + - record: up:count + expr: count(up > 0)