Skip to content

Commit 1eea138

Browse files
committed
Separate jobs for agent, server, and UI unit tests
We have also moved to the "Eoan" Ubuntu distribution, and updated the E2E tests to use the new style of headless browser setups.
1 parent f450a20 commit 1eea138

File tree

1 file changed

+45
-35
lines changed

1 file changed

+45
-35
lines changed

.travis.yml

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,74 @@
11
jobs:
22
include:
3-
- stage: "Unit Tests"
4-
name: "Unit Tests"
5-
dist: xenial
3+
- stage: "Agent Unit Tests"
4+
name: "agent-unit-tests"
5+
dist: eoan
66
language: perl
77
perl:
88
- "5.28"
9-
- "5.26"
10-
- "5.24"
11-
- "5.22"
12-
- "5.20"
13-
- "5.18"
14-
- "5.16"
15-
- "5.10"
169
before_install:
1710
- sudo apt-get update
1811
install:
1912
- sudo apt-get install python python-pip bc libjson-perl libswitch-perl realpath
20-
- sudo pip install configtools elasticsearch
13+
- sudo pip install configtools
2114
- sudo apt-get install python-software-properties
2215
- sudo add-apt-repository ppa:fkrull/deadsnakes -y
23-
- sudo apt-get update
16+
- sudo apt-get update -y -qq
2417
- sudo apt-get install python3.6 --force-yes -y
25-
- sudo wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
26-
- sudo python3.6 /tmp/get-pip.py
27-
- sudo pip install 'configtools<0.4.0' elasticsearch sh boto3
2818
- sudo ln -sf python3.6 /usr/bin/python3
19+
script: ./agent/run-unittests
20+
21+
- stage: "Server Unit Tests"
22+
name: "server-unit-tests"
23+
dist: eoan
24+
language: python
25+
python:
26+
- "3.6"
27+
env:
28+
- PBENCH_UNITTEST_SERVER_MODE=serial
29+
install:
30+
- sudo apt-get install realpath
31+
- pip install 'configtools<0.4.0' elasticsearch sh boto3
32+
script: ./server/bin/unittests
33+
34+
- stage: "Dashboard Unit Tests"
35+
name: "dashboard-unit-tests"
36+
dist: eoan
37+
language: node_js
38+
node_js:
39+
- "13"
40+
sudo: required
41+
before_install:
42+
# Remove /usr/local/bin/yarn to avoid conflicts with installed version
43+
- "sudo rm /usr/local/bin/yarn"
44+
install:
2945
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
3046
- sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
31-
- sudo apt-get update -qq
47+
- sudo apt-get update -y -qq
3248
- sudo apt-get install -y -qq yarn
33-
env:
34-
- PBENCH_UNITTEST_SERVER_MODE=serial
35-
script: ./run-unittests
36-
- stage: "E2E Tests"
37-
name: "E2E Tests"
49+
script: ./web-server/v0.4/unittests
50+
51+
- stage: "Dashboard E2E Tests"
52+
name: "dashboard-e2e-tests"
53+
dist: eoan
3854
language: node_js
3955
node_js:
40-
- "12"
41-
dist: trusty
56+
- "13"
4257
sudo: required
58+
services:
59+
# allow headless browser tests
60+
- xvfb
4361
addons:
4462
chrome: stable
4563
hostname: localhost
46-
apt:
47-
packages:
48-
# This is required to run new chrome on old trusty
49-
- libnss3
50-
# allow headful tests
5164
before_install:
5265
# Enable user namespace cloning
5366
- "sysctl kernel.unprivileged_userns_clone=1"
54-
# Launch XVFB
55-
- "export DISPLAY=:99.0"
56-
- "sh -e /etc/init.d/xvfb start"
57-
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
67+
# Remove /usr/local/bin/yarn to avoid conflicts with installed version
68+
- "sudo rm /usr/local/bin/yarn"
5869
install:
5970
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
6071
- sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
61-
- sudo apt-get update -qq
72+
- sudo apt-get update -y -qq
6273
- sudo apt-get install -y -qq yarn
63-
script: ./run-e2etests
64-
74+
script: ./web-server/v0.4/e2etests

0 commit comments

Comments
 (0)