-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (41 loc) · 1.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
sudo: false
language: go
dist: xenial
go:
- 1.18.z
- 1.17.x
- 1.16.x
- 1.15.x
env:
global:
- ORG_PATH=/home/travis/gopath/src/github.com/librato
- SNAP_PLUGIN_SOURCE=/home/travis/gopath/src/github.com/${TRAVIS_REPO_SLUG}
- GOMODCACHE=${GOPATH}/pkg/mod
jobs:
- TEST_TYPE=lint
- TEST_TYPE=build
- TEST_TYPE=small
- TEST_TYPE=medium
- TEST_TYPE=tutorial
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
before_install:
- "[[ -d $SNAP_PLUGIN_SOURCE ]] || mkdir -p $ORG_PATH && ln -s $TRAVIS_BUILD_DIR $SNAP_PLUGIN_SOURCE"
install:
- cd $SNAP_PLUGIN_SOURCE
- make deps
script:
- if [ "$TEST_TYPE" = "lint" ]; then make check 2>&1; fi
- if [ "$TEST_TYPE" = "build" ]; then wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && sudo dpkg -i packages-microsoft-prod.deb &&
sudo apt-get update && sudo apt-get install -y gcc-multilib gcc-mingw-w64 apt-transport-https dotnet-sdk-3.1 dotnet-runtime-3.1 && make build 2>&1; fi
- if [ "$TEST_TYPE" = "small" ]; then make check 2>&1; fi
- if [ "$TEST_TYPE" = "medium" ]; then make check 2>&1; fi
stages:
- name: lint
if: env(TEST_TYPE) IS "lint"
- name: build
if: env(TEST_TYPE) IS "build"
- name: test
if: env(TEST_TYPE) IN ("small", "medium", "tutorial")