Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Add circleci and golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioCarrion committed Feb 7, 2020
1 parent 95055f0 commit 53b11ac
Show file tree
Hide file tree
Showing 6 changed files with 488 additions and 30 deletions.
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2

jobs:
test:
docker:
- image: circleci/golang:1.13.6
steps:
- checkout
- run: go mod download
- run: go get -v -t -d ./...
- run: go test -v ./...
build:
docker:
- image: circleci/golang:1.13.6
steps:
- checkout
- run: go build github.com/MarioCarrion/versions
lint:
docker:
- image: circleci/golang:1.13.6
steps:
- checkout
- run: go mod tidy
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint
- run: golangci-lint run ./...
release:
docker:
- image: circleci/golang:1.13.6
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash

workflows:
version: 2
test_and_lint:
jobs:
- test
- build
- lint
release:
jobs:
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
linters:
enable-all: true
disable:
- gomnd

linters-settings:
funlen:
lines: 80
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module github.com/MarioCarrion/versions

go 1.13

require golang.org/x/mod v0.2.0
require (
github.com/golangci/golangci-lint v1.23.3
golang.org/x/mod v0.2.0
)
Loading

0 comments on commit 53b11ac

Please # to comment.