Refinements, fixes and additions e.g. for alerts multi-cluster setup #25
Workflow file for this run
This file contains hidden or 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: CI Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| env: | |
| JSONNET_VERSION: "v0.20.0" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v2 | |
| - name: setup-jsonnet | |
| uses: zendesk/setup-jsonnet@v11 | |
| with: | |
| version: ${{ env.JSONNET_VERSION }} | |
| - name: Jsonnet Lint | |
| run: | | |
| make lint-jsonnet | |
| make dashboards_out prometheus_alerts.yaml prometheus_rules.yaml | |
| - name: Archive manifests directory artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: manifests | |
| path: ./manifests/ | |
| test: | |
| name: Test | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v2 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: manifests | |
| path: ./manifests/ | |
| - name: prometheus-test | |
| run: | | |
| docker run --entrypoint "" \ | |
| --user root \ | |
| --volume="${{ github.workspace }}:/workspace" \ | |
| prom/prometheus:latest \ | |
| sh -c " | |
| cd /workspace && \ | |
| promtool check rules manifests/prometheus_rules.yaml && \ | |
| promtool check rules manifests/prometheus_alerts.yaml && \ | |
| promtool test rules tests.yaml | |
| " |