blob: 068f8875c8235c06b3fb5c242f2b8292b9afe225 [file] [log] [blame]
version: 2
jobs:
lint:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
steps:
- checkout
- setup_remote_docker
- run:
command: docker version
- run:
name: "Install Dependencies"
command: |
dockerfile=dobifiles/Dockerfile
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-builder:$CIRCLE_BUILD_NUM .
docker run --name \
deps-$CIRCLE_BUILD_NUM cli-builder:$CIRCLE_BUILD_NUM \
dep ensure
docker cp \
deps-$CIRCLE_BUILD_NUM:/go/src/github.com/gotestyourself/gotestyourself/vendor \
vendor
- run:
name: "Lint"
command: |
dockerfile=dobifiles/Dockerfile.lint
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-linter:$CIRCLE_BUILD_NUM .
docker run --rm cli-linter:$CIRCLE_BUILD_NUM
test-golang-1.9:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Unit Test GO 1.9"
command: scripts/ci/test 1.9-alpine
test-golang-1.8:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Unit Test GO 1.8"
command: scripts/ci/test 1.8-alpine
test-golang-1.10:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Unit Test GO 1.10"
command: scripts/ci/test 1.10-alpine
workflows:
version: 2
ci:
jobs:
- lint
- test-golang-1.8
- test-golang-1.9
- test-golang-1.10