filebrowser/.circleci/config.yml
Henrique Dias 8299f8ed06 chore: go 1.10 and fix linters
Former-commit-id: 289bceb9a90eb2422a69010863e7f2691eae357f [formerly b0cbba626a1185f95c6ce98d453cce99ee208e97] [formerly 90388476afb899550d56c82f836203e3d7942df6 [formerly 5c188d9dd4]]
Former-commit-id: a318b0f544706102d05a1f6faaeb2bbbd11ede29 [formerly 05b5bf7216959990c8cdccebae5fd91769aa9596]
Former-commit-id: af8ef1c7dc5926a9f6912249b2c0a334452c239b
2018-02-18 09:59:49 +00:00

81 lines
1.9 KiB
YAML

version: 2
jobs:
linting:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser && go get ./... && cd ../..
go get github.com/alecthomas/gometalinter
gometalinter --install
- run:
name: Run linting
command: |
gometalinter --exclude="rice-box.go" \
--deadline=300s \
-D goconst \
-D gocyclo \
-D vetshadow \
-D errcheck \
-D golint \
-D gas
build:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser
go get ./...
- run:
name: Building
command: go build
deploy:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/filebrowser/filebrowser
steps:
- checkout
- run:
name: Install Dependencies
command: |
cd cmd/filebrowser
go get ./...
cd ../..
- run:
name: Deploy
command: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
lint-build-deploy:
jobs:
- linting:
filters:
tags:
only: /.*/
branches:
only: /.*/
- build:
filters:
tags:
only: /.*/
branches:
only: /.*/
- deploy:
requires:
- linting
- build
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
branches:
ignore: /.*/