From 79606ea0aaf73228e8fb9aa0319b9b0637302871 Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Wed, 27 May 2026 16:01:58 -0300 Subject: [PATCH 1/6] Replace CircleCI with Github Actions Signed-off-by: Arthur Silva Sens --- .circleci/config.yml | 54 --------------------- .github/workflows/ci.yml | 101 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 54 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3c60937..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -version: 2.1 - -executors: - golang: - docker: - - image: cimg/go:1.15 - ruby: - docker: - - image: ruby:2.7 - -jobs: - build: - executor: golang - steps: - - checkout - - run: "cd ./src && make binaries" - unit-test: - executor: golang - steps: - - checkout - - run: "cd ./src && go test ./..." - test-success: - executor: golang - steps: - - checkout - - run: "make test-impl cmd-parser-text=echo" - test-python: - machine: true - steps: - - checkout - - run: "make test_prometheus_client_python_parser" - test-golang: - executor: golang - steps: - - checkout - - run: "make test_open_metrics_validator" - kdrfc: - executor: ruby - steps: - - checkout - - run: bundle install - - run: bundle exec kdrfc specification/OpenMetrics.md - - run: git diff --exit-code - -workflows: - version: 2 - openmetrics: - jobs: - - build - - unit-test - - kdrfc - - test-python - - test-golang diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..997e061 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,101 @@ +--- +name: CI + +on: + pull_request: + push: + branches: + - main + - master + - "release-*" + tags: + - "v*" + +permissions: + contents: read + +jobs: + build: + name: build + runs-on: ubuntu-latest + 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-file: src/go.mod + cache-dependency-path: src/go.sum + - name: Build binaries + working-directory: ./src + run: make binaries + + unit-test: + name: unit-test + runs-on: ubuntu-latest + 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-file: src/go.mod + cache-dependency-path: src/go.sum + - name: Run Go tests + working-directory: ./src + run: go test ./... + + test-python: + name: test-python + runs-on: ubuntu-latest + 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-file: src/go.mod + cache-dependency-path: src/go.sum + - name: Run Python parser test + run: make test_prometheus_client_python_parser + + test-golang: + name: test-golang + runs-on: ubuntu-latest + 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-file: src/go.mod + 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: Set up Ruby + uses: ruby/setup-ruby@b8d447ba7506ac7e0c8fbc50762276fb3b7df731 # v1 + with: + ruby-version: "2.7" + - name: Install Ruby dependencies + run: bundle install + - name: Validate generated specification + run: bundle exec kdrfc specification/OpenMetrics.md + - name: Check generated files are committed + run: git diff --exit-code From 2d319fd6916d739098082cc6883310791a6c9b3f Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Wed, 27 May 2026 16:12:55 -0300 Subject: [PATCH 2/6] Use ruby container instead of setup-ruby Signed-off-by: Arthur Silva Sens --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 997e061..33eeab2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,15 +84,13 @@ jobs: kdrfc: name: kdrfc runs-on: ubuntu-latest + container: + image: ruby:2.7 steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - name: Set up Ruby - uses: ruby/setup-ruby@b8d447ba7506ac7e0c8fbc50762276fb3b7df731 # v1 - with: - ruby-version: "2.7" - name: Install Ruby dependencies run: bundle install - name: Validate generated specification From 369478fa71044b1ac3fe2fddb3eac18e45952266 Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Wed, 27 May 2026 18:11:56 -0300 Subject: [PATCH 3/6] Try setting workspace explicitly Signed-off-by: Arthur Silva Sens --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33eeab2..205c54a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,4 +96,5 @@ jobs: - name: Validate generated specification run: bundle exec kdrfc specification/OpenMetrics.md - name: Check generated files are committed + working-directory: ${{ github.workspace }} run: git diff --exit-code From b23db26b2b3844711685075a7b6b5258d3a7c2a9 Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Fri, 29 May 2026 09:20:10 -0300 Subject: [PATCH 4/6] Test with Go 1.25 and 1.26 Signed-off-by: Arthur Silva Sens --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 205c54a..7340240 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,14 @@ permissions: jobs: build: - name: 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 @@ -26,15 +32,21 @@ jobs: - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version-file: src/go.mod + 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 + 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 @@ -43,15 +55,21 @@ jobs: - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version-file: src/go.mod + 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 + 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 @@ -60,14 +78,20 @@ jobs: - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version-file: src/go.mod + 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 + 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 @@ -76,7 +100,7 @@ jobs: - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version-file: src/go.mod + go-version: ${{ matrix.go-version }} cache-dependency-path: src/go.sum - name: Run Go validator test run: make test_open_metrics_validator From 9ce9180508981771001ad2de6e09bc81b7f6657f Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Fri, 29 May 2026 09:48:30 -0300 Subject: [PATCH 5/6] Try running ruby with docker Signed-off-by: Arthur Silva Sens --- .github/workflows/ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7340240..ead5e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,17 +108,20 @@ jobs: kdrfc: name: kdrfc runs-on: ubuntu-latest - container: - image: ruby:2.7 steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - name: Install Ruby dependencies - run: bundle install - name: Validate generated specification - run: bundle exec kdrfc specification/OpenMetrics.md + 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 - working-directory: ${{ github.workspace }} run: git diff --exit-code From c48e61b2aa78511a3e5f72d8db0752c01219335d Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Wed, 3 Jun 2026 15:00:17 -0300 Subject: [PATCH 6/6] Remove GitHub Actions Signed-off-by: Arthur Silva Sens --- .github/workflows/ci.yml | 127 --------------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ead5e5c..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,127 +0,0 @@ ---- -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