forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (83 loc) · 2.59 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
language: node_js
node_js:
- '8'
services:
- docker
env:
matrix:
- MODE=syntax
- MODE=python
# - MODE=node
- MODE=ruby
- MODE=semantic PR_ONLY=true
- MODE=semantic PR_ONLY=false
- MODE=model PR_ONLY=false
- MODE=linter PR_ONLY=true
- MODE=model PR_ONLY=true
- MODE=BreakingChange PR_ONLY=true
- MODE=azurebot PR_ONLY=true
- MODE=liveValidation PR_ONLY=true
matrix:
fast_finish: true
allow_failures:
- env: MODE=semantic PR_ONLY=false
- env: MODE=model PR_ONLY=false
- env: MODE=linter PR_ONLY=true
- env: MODE=model PR_ONLY=true
- env: MODE=BreakingChange PR_ONLY=true
- env: MODE=azurebot PR_ONLY=true
- env: MODE=liveValidation PR_ONLY=true
before_install:
- docker pull lmazuel/swagger-to-sdk
- python -c "import os; print('\n'.join(v for v in os.environ.keys() if v.startswith('TRAVIS')))" > /tmp/env_file
# Required for installing dotnet 2.0.0 according to https://www.microsoft.com/net/core#linuxubuntu
- curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
- sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
- sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-get update
- sudo apt-get install libunwind8 libicu52 -y
- sudo apt-get install dotnet-sdk-2.0.0 -y
install:
- npm install
script:
- DOCKER_CMD="docker run --rm --env-file /tmp/env_file -e GH_TOKEN -v $PWD:/git-restapi/ lmazuel/swagger-to-sdk"
- >-
if [[ $MODE == 'python' ]]; then
$DOCKER_CMD AutorestCI/azure-sdk-for-python --pr-repo-id Azure/azure-sdk-for-python -o master -v
fi
- >-
if [[ $MODE == 'node' ]]; then
$DOCKER_CMD AutorestCI/azure-sdk-for-node --pr-repo-id Azure/azure-sdk-for-node -o master -v
fi
- >-
if [[ $MODE == 'ruby' ]]; then
$DOCKER_CMD AutorestCI/azure-sdk-for-ruby --pr-repo-id Azure/azure-sdk-for-ruby -o master -v
fi
- >-
if [[ $MODE == 'syntax' ]]; then
npm test -- test/syntax.js
fi
- >-
if [[ $MODE == 'linter' ]]; then
npm test -- test/linter.js
fi
- >-
if [[ $MODE == 'semantic' ]]; then
npm test -- test/semantic.js
fi
- >-
if [[ $MODE == 'model' ]]; then
npm test -- test/model.js
fi
- >-
if [[ $MODE == 'BreakingChange' ]]; then
node -- scripts/breaking-change.js
fi
- >-
if [[ $MODE == 'azurebot' ]]; then
node scripts/momentOfTruth.js
fi
- >-
if [[ $MODE == 'liveValidation' ]]; then
node -- scripts/liveValidation.js;
fi