language: go
go:
- "1.8"
before_install:
- echo "before_install"
install:
- echo "install"
-
before_script:
- echo "before_script"
script:
- echo "script"

关于Job的定义,Job 就是一個歷經 TravisCI 生命週期所有步驟的基本單位。
关于Custom job的实现

引入job:include的概念
language: go
go:
- "1.8"
before_install:
- echo "before_install"
install:
- echo "install"
before_script:
- echo "before_script"
script:
- echo "script"
jobs:
include:
- stage: Custom Testing
name: Unit-Testing
go: "1.8"
script: echo "unit script"
- name: Integration-Testing
before_install: "Integration-Testing_before_install"
go: "1.9"
script: "Integration-Testing_script"
Stage 的特色以及概念如下
- 由一群
Job組成 - 只要有一個
Job失敗,該Stage就會被視為失敗 - 只有當該前 Stage 是成功的狀態,才會執行下一個 Stage
