This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(circleci): Switch to using circleci v2 syntax and fix build errors (
#4837) This patch fixes the continually breaking circleci build. The changes made were: - Switch to using circleci v2 syntax, as the v1 syntax will be deprecated in August. It also permits running this build locally using the `circleci` commandline tool. - Adjust timeouts on error tests to fail consistently on high-performance machines. - Correct error formatting on error tests.
- Loading branch information
1 parent
60cc0dc
commit 1c6a1a8
Showing
3 changed files
with
72 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,72 @@ | ||
machine: | ||
node: | ||
version: 6.9.1 | ||
environment: | ||
# Fix issue with selenium-server in containers. | ||
# See http://github.com/SeleniumHQ/docker-selenium/issues/87 | ||
DBUS_SESSION_BUS_ADDRESS: /dev/null | ||
|
||
dependencies: | ||
override: | ||
- npm i | ||
cache_directories: | ||
- testapp/node_modules | ||
post: | ||
- ./node_modules/.bin/gulp lint | ||
- ./node_modules/.bin/webdriver-manager update | ||
- ./node_modules/.bin/webdriver-manager start: | ||
background: true | ||
- cd testapp && npm i | ||
- npm start: | ||
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 | ||
- sudo apt-get update | ||
# Install the latest Firefox beta | ||
- pip install --upgrade pip | ||
- pip install mozdownload mozinstall | ||
- mozdownload --version latest --destination firefox.tar.bz2 | ||
- mozinstall firefox.tar.bz2 | ||
- sudo cp -R firefox/* /opt/firefox/ | ||
# Install the latest Chrome | ||
- 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 | ||
# Extra tcp logging for BlockingProxy | ||
- sudo tcpdump -i lo 'tcp && dst localhost' -w $CIRCLE_ARTIFACTS/localdump.pcap: | ||
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 | ||
|
||
test: | ||
override: | ||
- npm test | ||
- run: | ||
name: Test | ||
command: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters