feat: migrate from deprecated Graph (old) to Time series (#5) #15
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: 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@v3 | |
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@v3 | |
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 | |
" |