Skip to content

Commit 3fa4516

Browse files
authored
Circleci project setup (#2)
* Add .circleci/config.yml * Fixed make test * removing working dir * readme update * Update readme links
1 parent e9357b2 commit 3fa4516

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.circleci/config.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Golang CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-go/ for more details
4+
version: 2
5+
jobs:
6+
build:
7+
docker:
8+
# specify the version
9+
- image: circleci/golang:1.14
10+
11+
# Specify service dependencies here if necessary
12+
# CircleCI maintains a library of pre-built images
13+
# documented at https://circleci.com/docs/2.0/circleci-images/
14+
# - image: circleci/postgres:9.4
15+
16+
#### TEMPLATE_NOTE: go expects specific checkout path representing url
17+
#### expecting it in the form of
18+
#### /go/src/github.com/circleci/go-tool
19+
#### /go/src/bitbucket.org/circleci/go-tool
20+
#working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
21+
steps:
22+
- checkout
23+
24+
# specify any bash command here prefixed with `run: `
25+
- run: make test
26+
- run: make build

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ container: buildlinux
1717
docker build -t topine/ibm-spectrum-exporter:$(TAG) .
1818

1919
.PHONY: test
20-
PACKAGES = $(shell find ./pkg -type d -not -path './pkg' -not -path '*/testdata')
21-
2220
test:
23-
echo "mode: count" > coverage-all.out
24-
$(foreach pkg,$(PACKAGES),\
25-
go test -coverprofile=coverage.out -covermode=count $(pkg);\
26-
tail -n +2 coverage.out >> coverage-all.out;)
21+
go test -coverprofile=coverage.out -covermode=count ./...
2722

2823
.PHONY: coverage-html
2924
coverage-html: test
@@ -47,4 +42,4 @@ lint:
4742
golangci-lint run ./... --print-issued-lines=false
4843

4944
.PHONY: check
50-
check: fmt lint
45+
check: fmt lint

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
2+
13
# IBM Spectrum Exporter
4+
[![CircleCI](https://circleci.com/gh/topine/ibm-spectrum-exporter/tree/master.svg?style=shield)](https://circleci.com/gh/topine/ibm-spectrum-exporter)
5+
[![Docker Pulls](https://img.shields.io/docker/pulls/topine/ibm-spectrum-exporter.svg?maxAge=604800)](https://hub.docker.com/r/topine/ibm-spectrum-exporter/)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/topine/ibm-spectrum-exporter)](https://goreportcard.com/report/github.com/topine/ibm-spectrum-exporter)
27

38
IBM Spectrum Exporter is a Prometheus exporter to collect & export data from IBM Spectrum.
49

0 commit comments

Comments
 (0)