From 7352ab7f805ab3bf4d2144f3e8cac92d5caec263 Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Thu, 8 Jun 2023 13:44:53 +0200 Subject: [PATCH] Moving fully to GH actions. (#1288) Signed-off-by: bwplotka --- .circleci/config.yml | 63 --------------------- .github/workflows/{Circle-ci.yml => go.yml} | 10 ++-- README.md | 4 +- 3 files changed, 7 insertions(+), 70 deletions(-) delete mode 100644 .circleci/config.yml rename .github/workflows/{Circle-ci.yml => go.yml} (86%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2e8441b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: 2.1 -orbs: - go: circleci/go@1.7.1 - prometheus: prometheus/prometheus@0.16.0 -jobs: - test: - parameters: - go_version: - type: string - run_style_and_unused: - type: boolean - default: false - run_lint: - type: boolean - default: false - 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: make check_license test - - when: - condition: << parameters.run_lint >> - steps: - - run: make lint - - when: - condition: << parameters.run_style_and_unused >> - steps: - - run: make style unused - - when: - condition: << parameters.use_gomod_cache >> - steps: - - go/save-cache: - key: v1-go<< parameters.go_version >> - - store_test_results: - path: test-results -workflows: - version: 2 - client_golang: - jobs: - # Refer to README.md for the currently supported versions. - - test: - name: go-1-18 - go_version: "1.18" - run_lint: true - - test: - name: go-1-19 - go_version: "1.19" - run_lint: true - - test: - name: go-1-20 - go_version: "1.20" - run_lint: true - # Style and unused/missing packages are only checked against - # the latest supported Go version. - run_style_and_unused: true diff --git a/.github/workflows/Circle-ci.yml b/.github/workflows/go.yml similarity index 86% rename from .github/workflows/Circle-ci.yml rename to .github/workflows/go.yml index e7202af..0432d61 100644 --- a/.github/workflows/Circle-ci.yml +++ b/.github/workflows/go.yml @@ -1,15 +1,15 @@ -name: Test and Lint - +--- +name: Go on: + pull_request: push: branches: - main - pull_request: - branches: - - main + - 'release-*' jobs: test: + name: Tests runs-on: ubuntu-latest strategy: diff --git a/README.md b/README.md index 0a20e5d..63a300e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Prometheus Go client library -[![CircleCI](https://circleci.com/gh/prometheus/client_golang/tree/main.svg?style=svg)](https://circleci.com/gh/prometheus/client_golang/tree/main) -[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/client_golang)](https://goreportcard.com/report/github.com/prometheus/client_golang) +[![CI](https://github.com/prometheus/client_golang/actions/workflows/ci.yml/badge.svg)](https://github.com/prometheus/client_golang/actions/workflows/ci.yml) +[[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/client_golang)](https://goreportcard.com/report/github.com/prometheus/client_golang) [![Go Reference](https://pkg.go.dev/badge/github.com/prometheus/client_golang.svg)](https://pkg.go.dev/github.com/prometheus/client_golang) [![Slack](https://img.shields.io/badge/join%20slack-%23prometheus--client_golang-brightgreen.svg)](https://slack.cncf.io/)