This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
105 lines (97 loc) · 2.78 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
language: go
go:
- 1.12.x
go_import_path: github.com/appsody/appsody
services:
- docker
# skip the default language's install and script steps, we implement job stages instead
install: skip
script: skip
stages:
- name: lint
- name: test
- name: deploy
if: tag IS present
test-template: &test-template
stage: test
install: if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
script: travis_wait make cover
jobs:
include:
- name: Lint
stage: lint
os: linux
script: make lint
- <<: *test-template
name: Full Test on Linux amd64
os: linux
arch: amd64
dist: xenial
# installation instructions for Buildah taken from https://github.com/containers/buildah/blob/master/install.md
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y software-properties-common
- sudo add-apt-repository -y ppa:projectatomic/ppa
- sudo apt-get update -qq
- sudo apt-get -qq -y install buildah
- <<: *test-template
name: Full Test on Linux ppc64le
env: STACKS_LIST=dev.local/starter
os: linux
arch: ppc64le
dist: xenial
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y software-properties-common
- sudo add-apt-repository -y ppa:projectatomic/ppa
- sudo apt-get update -qq
- sudo apt-get -qq -y install buildah
before_script:
# packaging starter stack
- make build-linux-ppc64le
- cd ./cmd/testdata/starter
- ../../../build/appsody-0.0.0-linux-ppc64le stack package
- cd ../../../
- <<: *test-template
name: Full Test on Linux s390x
env: STACKS_LIST=dev.local/starter
os: linux
arch: s390x
dist: xenial
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y software-properties-common
- sudo add-apt-repository -y ppa:projectatomic/ppa
- sudo apt-get update -qq
- sudo apt-get -qq -y install buildah
before_script:
# packaging starter stack
- make build-linux-s390x
- cd ./cmd/testdata/starter
- ../../../build/appsody-0.0.0-linux-s390x stack package
- cd ../../../
- <<: *test-template
name: Unit Test on MacOS
os: osx
script:
- make unittest
- <<: *test-template
name: Unit Test on Windows
os: windows
script:
- make unittest
- name: Deploy Release
stage: deploy
os: linux
script:
- make VERSION=${TRAVIS_TAG} package
- make deploy
deploy:
provider: releases
skip_cleanup: true
api_key: $GH_TOKEN
file: package/*
file_glob: true
on:
branch: master
tags: true