forked from ckeditor/ckeditor4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (69 loc) · 2.12 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
os: linux
dist: xenial
branches:
only:
- master
- major
- stable
- latest
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
- /^release\/\d+\.\d+\.x$/
language: node_js
node_js: 10
git:
depth: false
env:
global:
- FULL_RUN=$(if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then echo "fullRun"; else echo ""; fi)
- TARGET_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then echo "origin/$TRAVIS_BRANCH^"; else echo "origin/$TRAVIS_BRANCH"; fi)
- CURRENT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then echo "origin/$TRAVIS_BRANCH"; else echo "origin/$TRAVIS_PULL_REQUEST_BRANCH"; fi)
jobs:
include:
- name: Chrome (Linux)
services:
- xvfb
addons:
chrome: stable
before_script:
- echo $TRAVIS_EVENT_TYPE
# Setup xvfb
- 'export DISPLAY=:99.0'
- 'sleep 3'
# Setup CKEditor 4 testing environment
- pwd
- npm install benderjs-cli -g
- npm i
# Setup bender test runner
- cd ..
- pwd
- git clone https://github.com/ckeditor/ckeditor4-benderjs-runner.git
- cd ckeditor4-benderjs-runner
- npm i
script:
- pwd
- echo "Running tests based on diff between $TARGET_BRANCH and $CURRENT_BRANCH"
- npm run start "../../ckeditor4/bender-runner.config.json" "$TARGET_BRANCH" "$CURRENT_BRANCH" "chrome" "$FULL_RUN"
- name: Firefox (Linux)
services:
- xvfb
addons:
firefox: latest
before_script:
- echo $TRAVIS_EVENT_TYPE
# Setup xvfb
- 'export DISPLAY=:99.0'
- 'sleep 3'
# Setup CKEditor 4 testing environment
- pwd
- npm install benderjs-cli -g
- npm i
# Setup bender test runner
- cd ..
- pwd
- git clone https://github.com/ckeditor/ckeditor4-benderjs-runner.git
- cd ckeditor4-benderjs-runner
- npm i
script:
- pwd
- echo "Running tests based on diff between $TARGET_BRANCH and $CURRENT_BRANCH"
- npm run start "../../ckeditor4/bender-runner.config.json" "$TARGET_BRANCH" "$CURRENT_BRANCH" "firefox" "$FULL_RUN"