Commit 10fdc146 authored by Oscar Campos's avatar Oscar Campos Committed by Oscar Campos
Browse files

fix: simplified pipeline steps as some are dependent on others

parent 82e61b1c
......@@ -21,9 +21,7 @@ variables:
stages:
- commits_check
- generation
- linting
- build
- version
# ---------------- commits check ----------------
......@@ -36,34 +34,28 @@ commit_messages_check:
except:
*release_refs
# ---------------- bindings generation ----------------
go_bindings_generation:
# ---------------- code checks ----------------
code_linting:
extends: .go-cache
stage: generation
image:
name: golangci/golangci-lint:latest
entrypoint: [""]
stage: linting
script:
# get goreturns and add it to the $PATH
- go get -u github.com/sqs/goreturns
- export PATH="$PATH:$GOPATH/bin"
# checkout godot_headers submodule
- git submodule update --init
# generate bindings and build library
- go run build/mage.go generate
allow_failure: false
except:
- tags
# ---------------- code checks ----------------
code_linting:
extends: .go-cache
stage: linting
script:
# run linters
- golangci-lint run -v --timeout 5m
allow_failure: false
except:
- tags
code_formatting:
extends: .go-cache
stage: linting
script:
- go get -u github.com/sqs/goreturns
# run goretuns formating
- if [[ $(goreturns -d .) -eq "" ]]; then echo "goreturns check success"; exit 0; fi
- echo "ERROR - goreturn check failed"
- goreturns -d .
......@@ -72,16 +64,6 @@ code_formatting:
except:
- tags
# ---------------- build ----------------
build_library:
extends: .go-cache
stage: build
script:
- go run build/mage.go build
allow_failure: false
except:
- tags
# ---------------- update version ----------------
version_update:
stage: version
......
......@@ -39,3 +39,6 @@ run:
skip-files:
- ".gen\\.go$"
- "_gen\\.go$"
# skip the following directories
skip-dirs:
- "(^|/)example($|/)"
......@@ -28,7 +28,7 @@ type listCmd struct{}
var cli struct {
Generate generateCmd `cmd help:"Generates autotoregistration boilerplate Go code for user defined structures"` //nolint:govet
List listCmd `cmd help:"List user defined autoregistrable data structures"` //nolint:govet
Version versionCmd `cmd help:"Show version information and exit"`
Version versionCmd `cmd help:"Show version information and exit"` //nolint:govet
Path string `type:"path" default:"." help:"Path where execute the command"`
Verbose bool `help:"Verbose output"`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment