From d86162c4f7a2b92bc2cf99908971bc98a7e7e4b5 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Tue, 29 Oct 2024 15:19:06 +0100 Subject: [PATCH] Update build testing * Update minimum Go version to 1.22. * Add build test matrix. Signed-off-by: SuperQ --- .circleci/config.yml | 41 ++++++++++++++++++++++++++++++----------- go.mod | 2 +- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c47db75..a49fc38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,33 +2,52 @@ version: 2.1 orbs: - goreleaser: hubci/goreleaser@2.3.0 - -executors: - golang: - docker: - - image: cimg/go:1.20 + go: circleci/go@1.7.1 + goreleaser: hubci/goreleaser@2.5.0 jobs: build: - executor: golang + parameters: + go_version: + type: string + use_gomod_cache: + type: boolean + default: true + docker: + - image: cimg/go:<< parameters.go_version >> steps: - checkout + - when: + condition: << parameters.use_gomod_cache >> + steps: + - go/load-cache: + key: v1-go<< parameters.go_version >> - run: go mod download - run: make + - when: + condition: << parameters.use_gomod_cache >> + steps: + - go/save-cache: + key: v1-go<< parameters.go_version >> workflows: version: 2 pro-bing: jobs: - build: + name: go-<< matrix.go_version >> + matrix: + parameters: + go_version: + - "1.22" + - "1.23" filters: tags: only: /.*/ - goreleaser/release: name: test-release - version: '1.16.2' - go-version: '1.20' + version: '2.3.2' + go-version: '1.23.2' dry-run: true requires: - build @@ -37,8 +56,8 @@ workflows: only: /.*/ - goreleaser/release: name: release - version: '1.16.2' - go-version: '1.20' + version: '2.3.2' + go-version: '1.23.2' requires: - build filters: diff --git a/go.mod b/go.mod index b4b8e0e..32412e8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/prometheus-community/pro-bing -go 1.19 +go 1.22 require ( github.com/google/uuid v1.6.0