Skip to content

Commit

Permalink
Enable Circle CI (#232)
Browse files Browse the repository at this point in the history
* Enable Circle CI

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* config: remove call to deprecated BuildNameToCertificate() function

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
simonpasquier authored Apr 27, 2020
1 parent 4d5f8c2 commit f4b35e2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
version: 2.1

orbs:
go: circleci/go@0.2.0

jobs:
test:
parameters:
go_version:
type: string
run_style:
type: boolean
default: false
use_gomod_cache:
type: boolean
default: true
docker:
- image: circleci/golang:<< parameters.go_version >>
working_directory: /go/src/github.com/prometheus/common
steps:
- checkout
- when:
condition: << parameters.use_gomod_cache >>
steps:
- go/load-cache:
key: v1-go<< parameters.go_version >>
- run: make test
- when:
condition: << parameters.run_style >>
steps:
- run: make style
- 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
tests:
jobs:
# Supported Go versions are synced with github.com/prometheus/client_golang.
- test:
name: go-1-9
go_version: "1.9"
use_gomod_cache: false
- test:
name: go-1-10
go_version: "1.10"
use_gomod_cache: false
- test:
name: go-1-11
go_version: "1.11"
- test:
name: go-1-12
go_version: "1.12"
- test:
name: go-1-13
go_version: "1.13"
- test:
name: go-1-14
go_version: "1.14"
# Style is only checked against the latest supported Go version.
run_style: true
1 change: 0 additions & 1 deletion config/http_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func newTestServer(handler func(w http.ResponseWriter, r *http.Request)) (*httpt
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: rootCAs}
testServer.TLS.Certificates[0] = serverCertificate
testServer.TLS.BuildNameToCertificate()

testServer.StartTLS()

Expand Down

0 comments on commit f4b35e2

Please sign in to comment.