forked from angular/protractor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
72 lines (61 loc) · 2.27 KB
/
circle.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
version: 2
jobs:
build:
docker:
- image: circleci/node:6.14-browsers
environment:
# Fix issue with selenium-server in containers.
# See http://github.com/SeleniumHQ/docker-selenium/issues/87
DBUS_SESSION_BUS_ADDRESS: /dev/null
steps:
- checkout
- run:
name: Install Dependencies
command: |
sudo apt-get update
sudo apt-get install python-pip tcpdump
# Have to update firefox, default is ESR.
sudo pip install --upgrade pip
sudo pip install mozdownload mozinstall
mozdownload --version latest --destination firefox.tar.bz2
mozinstall firefox.tar.bz2
sudo cp -R firefox/* /opt/firefox/
# Latest chrome is already installed in the default container.
# curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# sudo dpkg -i google-chrome.deb
# sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
# rm google-chrome.deb
- restore_cache:
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}
- run:
name: NPM Install
command: |
npm i
cd testapp && npm i
- save_cache:
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- "node_modules"
- "testapp/node_modules"
- run:
name: Lint
command: ./node_modules/.bin/gulp lint
- run:
name: Selenium Start
background: true
command: |
./node_modules/.bin/webdriver-manager update
./node_modules/.bin/webdriver-manager start
- run:
name: TestApp Start
background: true
command: |
npm start
# Seems like the new circleci container no longer permits packet introspection on lo, even for root.
# - run:
# name: Extra tcp logging for BlockingProxy
# background: true
# command: sudo tcpdump -i lo 'tcp && dst localhost' -w $CIRCLE_ARTIFACTS/localdump.pcap
- run:
name: Test
command: npm test