Skip to content

Commit

Permalink
feat(ci): add travis yml config for go
Browse files Browse the repository at this point in the history
progresses #4
  • Loading branch information
catyphram committed Feb 4, 2019
1 parent 214ec80 commit 1ab4574
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
matrix:
include:
- language: go
go: "1.11"
before_script:
- mkdir -p ${UNPROCESSED_IMAGES}
- cd api
script:
- go test ./...
env: GO111MODULE=on
services: mongodb
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The config params can also be set via environment variables.
Go into the `api/` folder and run `go get -d ./...` to download the dependencies, followed by `go build` to compile the executable.
This project is using [Go Modules](https://github.com/golang/go/wiki/Modules), which were introduced with Go v1.11. So, make sure that the project code is outside your `$GOPATH/src`, or set the environment variable `GO111MODULE=on` when running `go get|build|...`.

#### Running
#### Execution

Once built the executable can be started with `./api -c=/path/to/config.json`, or, if using env variables, `UNPROCESSED_IMAGES=/path/to/image/dir PORT=3333 DATABASE=tagallery DATABASE_HOST=localhost:27017 ./api`.

Expand Down

0 comments on commit 1ab4574

Please sign in to comment.