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 6, 2019
1 parent 214ec80 commit 7dc81cf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dist: xenial
matrix:
include:
- language: go
go: "1.11"
before_install:
- cd api
install:
- go get -d -v ./...
before_script:
- mkdir -p ${UNPROCESSED_IMAGES}
script:
- go test ./...
env: GO111MODULE=on
services: mongodb
- language: node_js
node_js: "node"
before_install:
- cd api
script:
- yarn lint && yarn test && yarn build
cache: yarn
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
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test": "yarn test:unit",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
},
Expand Down

0 comments on commit 7dc81cf

Please sign in to comment.