blob: d5a358a297c3bdc8c2ab8817837abf9191abc9dd [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
language: go
sudo: required
go:
- 1.11
install: true
before_script:
- mkdir -p $HOME/gopath/src/github.com/apache/servicecomb-kie
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/apache/servicecomb-kie/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/apache/servicecomb-kie
- cd $HOME/gopath/src/github.com/apache/servicecomb-kie
jobs:
include:
- stage: Format Checker
script: bash scripts/travis/formatChecker.sh
- stage: DeadCode Checker
script:
- go get -u github.com/tsenart/deadcode
- bash scripts/travis/deadCodeChecker.sh
- stage: Misspell Checker
script:
- go get -u github.com/client9/misspell
- bash scripts/travis/misspellChecker.sh
- stage: GoConst Checker
script:
- go get -u github.com/jgautheron/goconst/cmd/goconst
- bash scripts/travis/goConstChecker.sh
- stage: GoLint Checker
script:
- go get -u github.com/golang/lint/golint
- bash scripts/travis/goLintChecker.sh
- stage: GoCyclo Checker
script:
- go get github.com/fzipp/gocyclo
- bash scripts/travis/goCycloChecker.sh
- stage: Unit Test
script:
- GO111MODULE=on go mod download
- GO111MODULE=on go mod vendor
- bash scripts/travis/start_deps.sh
- sleep 15
- cd $HOME/gopath/src/github.com/apache/servicecomb-kie
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- bash scripts/travis/unit_test.sh