Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ jobs:
build:
# Variable expansion in working_directory not supported at this time
# You will need to modify the code below to reflect your github account/repo setup
working_directory: /go/src/github.com/Securing-DevOps/invoicer-chapter2
working_directory: /go/src/github.com/d0uble3L/invoicer-chapter2
docker:
#declares the env that the job will run on
- image: circleci/golang:1.10
steps:
- checkout
- setup_remote_docker

#environment variables neededto build the app
- run:
name: Setup environment
command: |
Expand All @@ -26,13 +28,13 @@ jobs:
EOF
- run: mkdir -p "${GOPATH_BASE}"
- run: mkdir -p "${GOPATH_HEAD}/bin"

# unit tests
- run:
name: Testing application
command: |
go test \
github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}

# if changes are made to the master branch, builds the docker containter of the application
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
Expand Down