File tree Expand file tree Collapse file tree 5 files changed +54
-9
lines changed Expand file tree Collapse file tree 5 files changed +54
-9
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ BASEDIR=$( dirname " $0 " )
4
+
5
+ go_fmt () {
6
+ format=$( go fmt ./...)
7
+ if [[ ${format} ]]; then
8
+ echo " go fmt failed:"
9
+ echo " ${format} "
10
+ exit 1
11
+ else
12
+ echo " go fmt passed in"
13
+ fi
14
+ }
15
+
16
+ main () {
17
+ cd ${BASEDIR} /..
18
+
19
+ go_fmt
20
+ }
21
+
22
+ main " $@ "
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ git_status_output=` git status`
4
+
5
+ make -f Makefile || exit
6
+
7
+ git_status_output_after=` git status`
8
+
9
+ if [[ " $git_status_output " != " $git_status_output_after " ]]; then
10
+ echo ERROR: make command modified code
11
+ echo " $git_status_output "
12
+ echo " $git_status_output_after "
13
+ exit 1
14
+ fi
15
+
Original file line number Diff line number Diff line change 1
1
language : go
2
2
3
3
go :
4
+ - 1.15.x
4
5
- 1.14.x
6
+ - 1.13.x
7
+
8
+ install : true
9
+
10
+ services :
11
+ - docker
5
12
6
13
before_install :
7
14
- go get -t -v ./...
8
15
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
9
16
10
17
script :
11
18
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic
12
- - make
19
+ - bash .ci/make.sh
20
+ - bash .ci/gofmt.sh
13
21
14
22
after_success :
15
23
- bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change 1
1
# ## Required tools
2
- GOTOOLS_CHECK = golangci-lint
2
+ GOTOOLS_CHECK = go golangci-lint
3
3
4
- all : fmt ensure-deps linter test
4
+ all : ensure-deps linter test
5
5
6
6
# ## Testing
7
7
test :
@@ -14,10 +14,6 @@ test-cover:
14
14
test-integration :
15
15
go test -tags integration ./... -covermode=atomic -coverpkg=./... -count=1 -race
16
16
17
- # ## Formatting, linting, and deps
18
- fmt :
19
- go fmt ./...
20
-
21
17
ensure-deps :
22
18
@echo " ==> Running go mod tidy"
23
19
go mod download
@@ -30,4 +26,4 @@ linter:
30
26
# To avoid unintended conflicts with file names, always add to .PHONY
31
27
# unless there is a reason not to.
32
28
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
33
- .PHONY : check_tools test test-cover fmt linter ensure-deps
29
+ .PHONY : all check_tools test test-cover linter ensure-deps
Original file line number Diff line number Diff line change 1
1
[ ![ codecov] ( https://codecov.io/gh/jattento/go-iso8583/branch/master/graph/badge.svg )] ( https://codecov.io/gh/jattento/go-iso8583 )
2
- [ ![ Build Status] ( https://travis-ci.com/jattento/go-iso8583.svg?branch=master )] ( https://travis-ci.com/jattento/go-iso8583 )
3
2
3
+ | Version | Build |
4
+ | ----------| :-------------:|
5
+ | Go 1.15 | [ ![ Build Status] ( https://travis-ci.com/jattento/go-iso8583.svg?branch=master )] ( https://travis-ci.com/jattento/go-iso8583 ) |
6
+ | Go 1.14 | [ ![ Build Status] ( https://travis-ci.com/jattento/go-iso8583.svg?branch=master )] ( https://travis-ci.com/jattento/go-iso8583 ) |
7
+ | Go 1.13 | [ ![ Build Status] ( https://travis-ci.com/jattento/go-iso8583.svg?branch=master )] ( https://travis-ci.com/jattento/go-iso8583 ) |
4
8
# go-iso8583
5
9
6
10
An easy to use, yet flexible marshaler for ISO-8583.
You can’t perform that action at this time.
0 commit comments