Configure build script to run e2e

jh-changes
Shin'ya Ueoka 5 years ago
parent b04eecce7f
commit 69bfd59531
  1. 18
      .circleci/config.yml
  2. 1
      .gitignore
  3. 6
      package.json

@ -6,6 +6,7 @@ executors:
- image: circleci/node:10-stretch-browsers
environment:
- FIREFOX_VERSION: "60.0esr"
- GECKODRIVER_VERSION: "0.24.0"
working_directory: ~
commands:
@ -29,6 +30,18 @@ commands:
- ~/firefox
- run: echo 'export PATH=~/firefox/$FIREFOX_VERSION:$PATH' >> $BASH_ENV
install_geckodriver:
steps:
- run:
name: Install geckodriver
command: |
mkdir -p geckodriver
url=https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
curl -sSLf "$url" | tar -C geckodriver xvf -
echo 'export PATH=~/geckodriver/$GECKODRIVER_VERSION:$PATH' >> $BASH_ENV
setup_npm:
steps:
- restore_cache:
@ -61,10 +74,9 @@ jobs:
- checkout
- setup_npm
- run: npm run build
- run: npm run ambassador:build
- run:
name: Run web server
command: node e2e/web-server
name: Run geckodriver
command: geckodriver
background: true
- run: npm run test:e2e

1
.gitignore vendored

@ -1,5 +1,4 @@
/node_modules/
/build/
/e2e/ambassador/build/
*.zip
lanthan-driver.log

@ -5,11 +5,9 @@
"start": "webpack --mode development -w --debug --devtool inline-source-map",
"build": "NODE_ENV=production webpack --mode production --progress --display-error-details",
"package": "npm run build && script/package.sh",
"lint": "eslint --ext .jsx,.js src e2e/ambassador/src",
"lint": "eslint --ext .jsx,.js src",
"test": "karma start",
"test:e2e": "karma start e2e/karma.conf.js",
"ambassador:start": "webpack --mode production -w --debug --context e2e/ambassador --config e2e/ambassador/webpack.config.js --devtool inline-source-map",
"ambassador:build": "webpack --mode production --context e2e/ambassador --config e2e/ambassador/webpack.config.js"
"test:e2e": "mocha --timeout 5000 e2e"
},
"repository": {
"type": "git",