Merge pull request #853 from prometheus/repo_sync

Synchronize common files from prometheus/prometheus
This commit is contained in:
Björn Rabenstein 2021-03-31 20:15:34 +02:00 committed by GitHub
commit 17e98a7e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 47 deletions

View File

@ -1,9 +1,7 @@
---
version: 2.1 version: 2.1
orbs: orbs:
go: circleci/go@0.2.0 go: circleci/go@0.2.0
prometheus: prometheus/prometheus@0.11.0
jobs: jobs:
test: test:
parameters: parameters:
@ -19,53 +17,52 @@ jobs:
type: boolean type: boolean
default: true default: true
docker: docker:
- image: circleci/golang:<< parameters.go_version >> - image: circleci/golang:<< parameters.go_version >>
working_directory: /go/src/github.com/prometheus/client_golang working_directory: /go/src/github.com/prometheus/client_golang
steps: steps:
- checkout - checkout
- when: - when:
condition: << parameters.use_gomod_cache >> condition: << parameters.use_gomod_cache >>
steps: steps:
- go/load-cache: - go/load-cache:
key: v1-go<< parameters.go_version >> key: v1-go<< parameters.go_version >>
- run: make check_license test - run: make check_license test
- when: - when:
condition: << parameters.run_lint >> condition: << parameters.run_lint >>
steps: steps:
- run: make lint - run: make lint
- when: - when:
condition: << parameters.run_style_and_unused >> condition: << parameters.run_style_and_unused >>
steps: steps:
- run: make style unused - run: make style unused
- when: - when:
condition: << parameters.use_gomod_cache >> condition: << parameters.use_gomod_cache >>
steps: steps:
- go/save-cache: - go/save-cache:
key: v1-go<< parameters.go_version >> key: v1-go<< parameters.go_version >>
- store_test_results: - store_test_results:
path: test-results path: test-results
workflows: workflows:
version: 2 version: 2
client_golang: client_golang:
jobs: jobs:
# Refer to README.md for the currently supported versions. # Refer to README.md for the currently supported versions.
- test: - test:
name: go-1-13 name: go-1-13
go_version: "1.13" go_version: "1.13"
run_lint: true run_lint: true
- test: - test:
name: go-1-14 name: go-1-14
go_version: "1.14" go_version: "1.14"
run_lint: true run_lint: true
- test: - test:
name: go-1-15 name: go-1-15
go_version: "1.15" go_version: "1.15"
run_lint: true run_lint: true
- test: - test:
name: go-1-16 name: go-1-16
go_version: "1.16" go_version: "1.16"
run_lint: true run_lint: true
# Style and unused/missing packages are only checked against # Style and unused/missing packages are only checked against
# the latest supported Go version. # the latest supported Go version.
run_style_and_unused: true run_style_and_unused: true