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.67 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=branchStrategy
- MODE=syntax CHECK_NAME="Syntax Validator"
- MODE=python CHECK_NAME="SDK Generation - Python"
- MODE=node CHECK_NAME="SDK Generation - Node"
- MODE=ruby CHECK_NAME="SDK Generation - Ruby"
- MODE=java CHECK_NAME="SDK Generation - Java"
- MODE=go CHECK_NAME="SDK Generation - Go"
- MODE=semantic PR_ONLY=true CHECK_NAME="Semantic Validator"
- MODE=semantic PR_ONLY=false
- MODE=model PR_ONLY=true CHECK_NAME="Model Validator"
- MODE=BreakingChange PR_ONLY=true CHECK_NAME="Breaking Changes"
- MODE=lintdiff PR_ONLY=true CHECK_NAME="Linter Diff"
matrix:
fast_finish: true
allow_failures:
- env: MODE=node CHECK_NAME="SDK Generation - Node"
- env: MODE=ruby CHECK_NAME="SDK Generation - Ruby"
- env: MODE=java CHECK_NAME="SDK Generation - Java"
- env: MODE=go CHECK_NAME="SDK Generation - Go"
- env: MODE=semantic PR_ONLY=false
- env: MODE=model PR_ONLY=true CHECK_NAME="Model Validator"
- env: MODE=BreakingChange PR_ONLY=true CHECK_NAME="Breaking Changes"
install: true
script:
- >-
if [[ $MODE == 'python' ]]; then
travis_wait 30 scripts/swagger-to-sdk.sh Azure/azure-sdk-for-python -v
fi
- >-
if [[ $MODE == 'node' ]]; then
travis_wait 30 scripts/swagger-to-sdk.sh Azure/azure-sdk-for-node -v
fi
- >-
if [[ $MODE == 'ruby' ]]; then
travis_wait 30 scripts/swagger-to-sdk.sh Azure/azure-sdk-for-ruby -v
fi
- >-
if [[ $MODE == 'go' ]]; then
travis_wait 30 scripts/swagger-to-sdk.sh Azure/azure-sdk-for-go -o latest -v
fi
- >-
if [[ $MODE == 'java' ]]; then
travis_wait 30 scripts/swagger-to-sdk.sh Azure/azure-libraries-for-java -v
fi
- >-
if [[ $MODE == 'branchStrategy' ]]; then
# Check to ensure CI is not executing for a PR against the master branch in the private repository
! [[ $TRAVIS_PULL_REQUEST != 'false' && $TRAVIS_REPO_SLUG == 'Azure/azure-rest-api-specs-pr' && $TRAVIS_BRANCH == 'master' ]]
fi
- >-
if [[ $MODE == 'syntax' ]]; then
npm install
npm test -- test/syntax.js
fi
- >-
if [[ $MODE == 'semantic' ]]; then
npm install
npm test -- test/semantic.js
fi
- >-
if [[ $MODE == 'model' ]]; then
npm install
node scripts/modelValidation.js
fi
- >-
if [[ $MODE == 'BreakingChange' ]]; then
scripts/install-dotnet.sh
npm install
node -- scripts/breaking-change.js
fi
- >-
if [[ $MODE == 'lintdiff' ]]; then
scripts/install-dotnet.sh
npm install
node scripts/momentOfTruth.js && node scripts/momentOfTruthPostProcessing.js
fi