Merge pull request #489 from ueokande/circleci-2.1

CircleCI 2.1
jh-changes
Shin'ya Ueoka 6 years ago committed by GitHub
commit e8ef52b567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 45
      .circleci/config.yml

@ -1,11 +1,15 @@
version: 2 version: 2.1
jobs:
build: executors:
default:
docker: docker:
- image: circleci/node:10-stretch-browsers - image: circleci/node:10-stretch-browsers
environment: environment:
- FIREFOX_VERSION: "60.0esr" - FIREFOX_VERSION: "60.0esr"
working_directory: ~ working_directory: ~
commands:
install_firefox:
steps: steps:
- restore_cache: - restore_cache:
key: firefox-bin key: firefox-bin
@ -23,9 +27,10 @@ jobs:
key: firefox-bin key: firefox-bin
paths: paths:
- ~/firefox - ~/firefox
- run: sudo apt-get update && sudo apt-get install -y libgtk-3-0 libdbus-glib-1-2 - run: echo 'export PATH=~/firefox/$FIREFOX_VERSION:$PATH' >> $BASH_ENV
- checkout setup_npm:
steps:
- restore_cache: - restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }} key: dependency-cache-{{ checksum "package-lock.json" }}
- run: - run:
@ -36,10 +41,36 @@ jobs:
paths: paths:
- node_modules - node_modules
- run: echo 'export PATH=~/firefox/$FIREFOX_VERSION:$PATH' >> $BASH_ENV jobs:
build:
executor:
name: default
steps:
- install_firefox
- checkout
- setup_npm
- run: npm run lint - run: npm run lint
- run: npm test - run: npm test
- run: npm run package - run: npm run package
e2e:
executor:
name: default
steps:
- install_firefox
- checkout
- setup_npm
- run: npm run build - run: npm run build
- run: npm run ambassador:build - run: npm run ambassador:build
- run: node >/dev/null e2e/web-server & npm run test:e2e - run:
name: Run web server
command: node e2e/web-server
background: true
- run: npm run test:e2e
workflows:
version: 2
build_and_test:
jobs:
- build
- e2e