Fix write_to_file function #146
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test prometheus rules | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- "**.rst" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
promtool: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
# prometheus snap includes 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 |