Skip to content

Commit

Permalink
Update to github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
biswassri committed Nov 14, 2024
1 parent ab09b9c commit 1f095f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/prometheus-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Install Promtool
run: |
go install github.com/prometheus/prometheus/cmd/promtool@latest
export PATH=$PATH:$(go env GOPATH)/bin
promtool --version
sudo apt-get update && sudo apt-get install -y prometheus
- name: Run prometheus-unit-tests
run : make test-alerts
2 changes: 1 addition & 1 deletion tests/prometheus_unit_tests/scripts/check_alert_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while IFS= read -r ALERT; do
done < <(yq -N e '.data[]
| from_yaml
| .groups[].rules[]
| select(.alert != "DeadManSnitch" and .labels.severity == strenv(ALERT_SEVERITY))
| select(.alert != "DeadManSnitch" and .labels.severity == "critical")
| .alert' "${PROMETHEUS_CONFIG_YAML}")

# Collect all alerts from the unit test files
Expand Down

0 comments on commit 1f095f8

Please sign in to comment.