Skip to content

Commit

Permalink
Merge pull request #32 from berty/dev/moul/setup-ci
Browse files Browse the repository at this point in the history
build(ci): initial ci
  • Loading branch information
moul committed Jul 25, 2018
2 parents 528275a + eeb87ad commit 0e70154
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,50 @@
version: 2

.golang_workspace: &golang_workspace
working_directory: /go/src/github.com/berty/berty
environment:
GOPATH: /go
GOTEST_TIMEOUT: 1m
docker:
- image: circleci/golang:latest

jobs:
core.go.test:
<<: *golang_workspace
steps:
- checkout
- restore_cache:
keys:
- v1-go-cache
- run:
name: prepare CI
command: |
(cd core; make _ci_prepare)
mkdir -p /tmp/test-results
go get github.com/jstemmer/go-junit-report
#- run:
# name: install core
# command: |
# cd core
# make install
- run:
name: test core
command: |
cd core
make test | tee /tmp/test-results/go-test-report.out
- run:
name: junit-report
command: |
go-junit-report < /tmp/test-results/go-test-report.out > /tmp/test-results/go-test-report.xml
- save_cache:
key: v1-go-cache
paths:
- "/go/pkg"
- store_test_results:
path: /tmp/test-results

workflows:
version: 2
commit:
jobs:
- core.go.test
5 changes: 5 additions & 0 deletions core/Makefile
Expand Up @@ -21,3 +21,8 @@ clean:

.PHONY: generate
generate: $(GENERATED_FILES)

.PHONY: _ci_prepare
_ci_prepare:
@# touching files to avoid regenerating files based on modification date
touch $(GENERATED_FILES)

0 comments on commit 0e70154

Please sign in to comment.