php-fpm-exporter/.circleci/config.yml

65 lines
1.7 KiB
YAML
Raw Normal View History

2018-02-18 00:55:06 +00:00
version: 2
jobs:
2018-02-18 11:49:36 +00:00
2018-02-24 23:18:47 +00:00
test:
2018-02-18 00:55:06 +00:00
docker:
- image: circleci/golang:1.11
2018-02-18 00:55:06 +00:00
steps:
- checkout
- run:
name: Install Code Climate test-reporter
command: |
2018-02-28 03:04:55 +00:00
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- run:
name: Install gometalinter
command: curl -L https://git.io/vp6lP | sudo BINDIR=/go/bin sh
- run: make deps lint test-coverage
- run:
name: Upload Code coverage
command: |
sed -i 's#github.com/hipages/php-fpm_exporter/##' .cover/cover.out
./cc-test-reporter format-coverage -t gocov .cover/cover.out
./cc-test-reporter upload-coverage
2018-02-18 00:55:06 +00:00
semantic-release:
2018-02-24 23:18:47 +00:00
docker:
- image: circleci/node:9
2018-02-24 23:18:47 +00:00
steps:
- checkout
- run: yarn global add --prefer-offline --no-progress --non-interactive "semantic-release@15.5.0" "@semantic-release/exec@2.2.4"
- run: $(yarn global bin)/semantic-release
2018-02-24 23:18:47 +00:00
2018-02-18 11:49:36 +00:00
deploy:
docker:
2018-12-30 23:13:41 +00:00
- image: circleci/golang:1.11
2018-02-18 11:49:36 +00:00
steps:
2018-02-18 11:50:08 +00:00
- checkout
- setup_remote_docker
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
2018-02-18 11:49:36 +00:00
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
build-n-deploy:
jobs:
2018-02-24 23:18:47 +00:00
- test:
filters:
tags:
only: /^v.*/
- semantic-release:
requires:
- test
filters:
branches:
only: master
2018-02-18 11:49:36 +00:00
- deploy:
requires:
2018-02-25 00:13:14 +00:00
- test
2018-02-18 11:49:36 +00:00
filters:
2018-02-18 11:57:56 +00:00
branches:
ignore: /.*/
2018-02-18 11:49:36 +00:00
tags:
only: /^v.*/