-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add circleci configuration file (#5)
- Loading branch information
Showing
2 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Golang CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-go/ for more details | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/golang:1.9 | ||
environment: | ||
- PG_URL=postgres://test:test@localhost:5432/oathkeeper?sslmode=disable | ||
- image: postgres:9.5 | ||
environment: | ||
- POSTGRES_USER=test | ||
- POSTGRES_PASSWORD=test | ||
- POSTGRES_DB=oathkeeper | ||
|
||
working_directory: /go/src/github.com/ory/oathkeeper | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: go get -u github.com/go-swagger/go-swagger/cmd/swagger github.com/bradfitz/goimports github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/Masterminds/glide github.com/ory/go-acc | ||
|
||
# Installation | ||
- run: glide install | ||
- run: go install github.com/ory/oathkeeper | ||
- run: glide update | ||
- run: go install github.com/ory/oathkeeper | ||
|
||
# Format | ||
- run: ./scripts/test-format.sh | ||
|
||
# Tests | ||
- run: go-acc -o coverage.txt $(glide novendor) | ||
- run: go test -race -short $(glide novendor | grep -v cmd) | ||
|
||
# See if swagger works | ||
- run: ./scripts/run-genswag.sh | ||
|
||
# Build and test dockerfiles | ||
- run: docker build -t oathkeeper-proxy-travis-ci -f Dockerfile-proxy . | ||
- run: docker build -t oathkeeper-management-travis-ci -f Dockerfile-management . | ||
- run: docker run -d oathkeeper-proxy-travis-ci | ||
- run: docker run -d oathkeeper-management-travis-ci | ||
|
||
# Submit coverage details | ||
- run: goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters