mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 10:26:40 +00:00
Add circleci config file
This commit is contained in:
60
.circleci/config.yml
Normal file
60
.circleci/config.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.10
|
||||||
|
working_directory: /go/src/github.com/jimeh/casecmp
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install tools
|
||||||
|
command: |
|
||||||
|
curl -L https://github.com/golang/dep/raw/master/install.sh | sh
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
command: dep ensure
|
||||||
|
- run:
|
||||||
|
name: Build binary
|
||||||
|
command: make
|
||||||
|
- run:
|
||||||
|
name: Start service
|
||||||
|
command: ./bin/casecmp --port=8080
|
||||||
|
background: true
|
||||||
|
- run:
|
||||||
|
name: Validate service is working
|
||||||
|
command: |
|
||||||
|
curl --retry 10 --retry-delay 1 --retry-connrefused \
|
||||||
|
http://localhost:8080/
|
||||||
|
release:
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.10
|
||||||
|
working_directory: /go/src/github.com/jimeh/casecmp
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install tools
|
||||||
|
command: |
|
||||||
|
curl -L https://github.com/golang/dep/raw/master/install.sh | sh
|
||||||
|
go get github.com/goreleaser/goreleaser
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
command: dep ensure
|
||||||
|
- run:
|
||||||
|
name: Run goreleaser
|
||||||
|
command: goreleaser
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build-and-release:
|
||||||
|
jobs:
|
||||||
|
- build:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /.*/
|
||||||
|
- release:
|
||||||
|
requires:
|
||||||
|
- build
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /.*/
|
||||||
|
tags:
|
||||||
|
only: /^[0-9]+(\.[0-9]+)*/
|
||||||
Reference in New Issue
Block a user