Skip to content

Remove CircleCI

Remove CircleCI #5

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- main
- master
- "release-*"
tags:
- "v*"
permissions:
contents: read
jobs:
build:
name: build (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.25.x"
- "1.26.x"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: src/go.sum
- name: Build binaries
working-directory: ./src
run: make binaries
unit-test:
name: unit-test (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.25.x"
- "1.26.x"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: src/go.sum
- name: Run Go tests
working-directory: ./src
run: go test ./...
test-python:
name: test-python (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.25.x"
- "1.26.x"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: src/go.sum
- name: Run Python parser test
run: make test_prometheus_client_python_parser
test-golang:
name: test-golang (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.25.x"
- "1.26.x"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: src/go.sum
- name: Run Go validator test
run: make test_open_metrics_validator
kdrfc:
name: kdrfc
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Validate generated specification
run: |
docker run --rm \
--user "$(id -u):$(id -g)" \
-e BUNDLE_PATH=/tmp/bundle \
-e HOME=/tmp \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
ruby:2.7 \
sh -lc "bundle install && bundle exec kdrfc specification/OpenMetrics.md"
- name: Check generated files are committed
run: git diff --exit-code