name: Mixin # The runbook check in "mise run test" reads docs/runbooks, so runbook # changes run this workflow too. on: pull_request: paths: - contrib/mixin/** - contrib/dashboard/*.json - contrib/monitoring/*.yaml - docs/collector.*.md - docs/runbooks/** - docs/upgrade/** - docs/README.md - README.md - internal/metriccontract/** - .github/workflows/mixin.yml push: branches: - master - next - main paths: - contrib/mixin/** - contrib/dashboard/*.json - contrib/monitoring/*.yaml - docs/collector.*.md - docs/runbooks/** - docs/upgrade/** - docs/README.md - README.md - internal/metriccontract/** - .github/workflows/mixin.yml workflow_dispatch: permissions: {} concurrency: group: mixin-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: rules: name: Validate mixin rules and dashboard runs-on: ubuntu-26.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: Install and cache pinned mixin tools uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: working_directory: contrib/mixin - name: Build dashboard and check generated changes run: mise run check-dashboards - name: Generate rules and check generated changes run: mise run check-rules - name: Lint dashboard and test rules run: mise run test # Runs on Linux: the test reads the Go sources and builds no collector. - name: Check metric references working-directory: . run: go test -count=1 ./internal/metriccontract/