forked from SAP/fundamental-ngx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
135 lines (135 loc) · 4.42 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
language: node_js
sudo: required
node_js: 12.18.4
cache: npm
dist: trusty
addons:
chrome: stable
hosts:
- sap.dev
git:
depth: false
script:
- npm run build-all
jobs:
include:
- stage: "Lint and Test"
if: type = pull_request
before_script: export NODE_OPTIONS='–--max_old_space_size=4096'
env:
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- BUILD_ID=$TRAVIS_BUILD_ID
- JOB_URL=$TRAVIS_JOB_WEB_UR
- SAUCE_USERNAME=$SAUCE_USERNAME
- SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY
script: bash ./ci-scripts/test-lint.sh && npm run test:coveralls && npm run build-pack-library
- stage: "Test"
name: Sauce Labs - e2e tests - platformA
if: type = pull_request
env:
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- BUILD_ID=$TRAVIS_BUILD_ID
- JOB_URL=$TRAVIS_JOB_WEB_UR
- SAUCE_USERNAME=$SAUCE_USERNAME
- SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY
- FIREBASE_TOKEN=$FIREBASE_TOKEN
- GITHUB_TOKEN=$GITHUB_TOKEN
before_script:
- sudo apt-get install jq
- npm install firebase-tools -g
script: npm run e2e:platformA:ci
- stage: "Test"
name: Sauce Labs - e2e tests - platformB
if: type = pull_request
env:
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- BUILD_ID=$TRAVIS_BUILD_ID
- JOB_URL=$TRAVIS_JOB_WEB_UR
- SAUCE_USERNAME=$SAUCE_USERNAME
- SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY
- FIREBASE_TOKEN=$FIREBASE_TOKEN
- GITHUB_TOKEN=$GITHUB_TOKEN
before_script:
- sudo apt-get install jq
- npm install firebase-tools -g
script: npm run e2e:platformB:ci
- stage: "Test"
name: Sauce Labs - e2e tests (core)
if: type = pull_request
env:
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- BUILD_ID=$TRAVIS_BUILD_ID
- JOB_URL=$TRAVIS_JOB_WEB_UR
- SAUCE_USERNAME=$SAUCE_USERNAME
- SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY
- FIREBASE_TOKEN=$FIREBASE_TOKEN
- GITHUB_TOKEN=$GITHUB_TOKEN
before_script:
- sudo apt-get install jq
- npm install firebase-tools -g
script: npm run e2e:core:ci
- stage: "Test"
name: Sauce Labs - unit tests platform
if: type = pull_request
env:
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- BUILD_ID=$TRAVIS_BUILD_ID
- JOB_URL=$TRAVIS_JOB_WEB_UR
- SAUCE_USERNAME=$SAUCE_USERNAME
- SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY
script: npm run test:platform:saucelabs
- stage: "Test"
name: Sauce Labs - unit tests core
if: type = pull_request
script: npm run test:core:saucelabs
# - stage: "Test"
# name: A11y report
# if: type = pull_request
# script: npm run e2e:a11y
- stage: "Pre-release"
if: branch = main AND type = push
before_script: export NODE_OPTIONS='–--max_old_space_size=4096'
before_deploy:
- git checkout main
- bash ./ci-scripts/setup-npm.sh
deploy:
- provider: script
script: bash ./ci-scripts/publish.sh
skip_cleanup: true
on:
all_branches: true
- stage: "Release"
if: branch = tmp_branch_for_automated_release_do_not_use
before_script: export NODE_OPTIONS='-–-max_old_space_size=4096'
before_deploy:
- git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch
- git checkout main
- bash ./ci-scripts/setup-npm.sh
deploy:
- provider: script
script: bash ./ci-scripts/publish.sh
skip_cleanup: true
on:
all_branches: true
- stage: "Hotfix-release"
if: branch = hotfix_tmp_branch_for_automated_release_do_not_use
before_script: export NODE_OPTIONS='–--max_old_space_size=4096'
before_deploy:
- git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch
- git checkout hotfix_tmp_branch_for_automated_release_do_not_use
- bash ./ci-scripts/setup-npm.sh
deploy:
- provider: script
script: bash ./ci-scripts/hotfix-publish.sh
skip_cleanup: true
on:
all_branches: true
notifications:
email:
on_failure: always
on_success: change
slack:
rooms:
- ui-fundamentals:zVRyxlqkYnQFD7p8QHkWM8Fd#ngx-automated