Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and CI rework #35

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.build/
clickhouse_exporter
coverage.txt
dist
19 changes: 19 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
before:
hooks:
- make init

archive:
format: binary

nfpm:
homepage: https://github.com/f1yegor/clickhouse_exporter
description: >
Simple server that periodically scrapes ClickHouse stats
and exports them via HTTP for Prometheus consumption.

license: MIT

formats:
- deb
- rpm
11 changes: 0 additions & 11 deletions .promu.yml

This file was deleted.

22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
dist: trusty
---
dist: xenial
sudo: required
language: go

addons:
apt:
packages:
# needed for the nfpm pipe:
- rpm

go:
- 1.8.x
- 1.9.x
- master
- 1.11.6
- 1.12.1

go_import_path: github.com/f1yegor/clickhouse_exporter

Expand All @@ -24,3 +30,11 @@ script:

after_success:
- bash <(curl -s https://codecov.io/bash) -X fix

deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_OS_NAME = 'linux' && $TRAVIS_GO_VERSION = '1.12.1'
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
all: build test

init:
go get -u github.com/prometheus/promu
go get -u github.com/AlekSi/gocoverutil

build:
go install -v
promu build

test:
go test -v -race
gocoverutil -coverprofile=coverage.txt test -v
docker-compose up -d
go test -v -race ./...
gocoverutil -coverprofile=coverage.txt test -v ./...
docker-compose down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.