mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 18:19:04 +02:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: Mixin
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- contrib/mixin/**
|
|
- dashboard/windows-exporter-dashboard.json
|
|
- .github/workflows/mixin.yml
|
|
push:
|
|
branches:
|
|
- master
|
|
- next
|
|
- main
|
|
paths:
|
|
- contrib/mixin/**
|
|
- dashboard/windows-exporter-dashboard.json
|
|
- .github/workflows/mixin.yml
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: mixin-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rules:
|
|
name: Validate Prometheus rules
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
working-directory: contrib/mixin
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: 'false'
|
|
|
|
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Cache mixin tools
|
|
id: tools-cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: ~/go/bin
|
|
key: ${{ runner.os }}-${{ runner.arch }}-mixin-tools-${{ hashFiles('contrib/mixin/Makefile', 'go.mod') }}
|
|
|
|
- name: Install pinned tools
|
|
if: steps.tools-cache.outputs.cache-hit != 'true'
|
|
run: make tools
|
|
|
|
- name: Lint and test rules
|
|
run: |
|
|
make test PROMTOOL="docker run --rm --entrypoint promtool -v \"$PWD:/mixin:ro\" -w /mixin prom/prometheus:v3.15.0"
|