Skip to content

Commit 4119234

Browse files
author
Kshitij Saraogi
committed
Add basic CircleCI config
1 parent 7f6486c commit 4119234

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.circleci/config.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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.10
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.5
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/kshitij10496/hercules
21+
steps:
22+
- checkout # Clone repo from GitHub
23+
24+
# specify any bash command here prefixed with `run: `
25+
- run: make build
26+
- run: make test
27+

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
.PHONY: authors
22

3+
GOPACKAGES = $(shell go list ./... | grep -v /vendor/)
4+
35
docker/build:
46
docker build -t hercules:latest .
57

68
docker/run_attached:
79
docker run --rm -p 8080:8080 hercules:latest
810

11+
build:
12+
go build -o hercules
13+
14+
test:
15+
go test -v $(GOPACKAGES)
16+
917
authors:
1018
rm AUTHORS
1119
git log --pretty="%an <%ae>" | sort | uniq >> AUTHORS

0 commit comments

Comments
 (0)