tridactyl/.circleci/config.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2019-05-15 19:58:06 +02:00
version: 2.1
commands:
commoncmd:
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
2019-05-31 16:48:53 +01:00
- run: yarn install
2019-05-15 19:58:06 +02:00
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
2019-05-31 16:48:53 +01:00
- run: yarn run build
2019-05-15 19:58:06 +02:00
jobs:
lint:
docker:
- image: circleci/node:latest
steps:
- run: sudo apt update
- run: sudo apt install -qq shellcheck
2019-05-15 19:58:06 +02:00
- commoncmd
- run: bash -c 'GLOBIGNORE="node_modules" shellcheck **/*.sh'
2019-05-31 16:48:53 +01:00
- run: yarn run lint
- run: bash -c '"$(yarn bin)/tslint" --project .'
2019-05-15 19:58:06 +02:00
unit:
docker:
- image: circleci/node:latest
steps:
- commoncmd
2019-05-31 16:48:53 +01:00
- run: bash -c '"$(yarn bin)/jest" src'
2019-05-15 19:58:06 +02:00
e2e:
docker:
- image: circleci/node:latest-browsers
environment:
MOZ_HEADLESS: 1
2019-05-15 19:58:06 +02:00
steps:
- commoncmd
2019-05-31 16:48:53 +01:00
- run: sudo yarn i -g get-firefox
- run: get-firefox --branch nightly --platform linux --extract --target ~/
- run: ~/firefox/firefox -v
2019-05-31 16:48:53 +01:00
- run: bash -c '"$(yarn bin)/web-ext" build --source-dir ./build --overwrite-dest'
2019-05-15 19:58:06 +02:00
- run: mv web-ext-artifacts/*.zip web-ext-artifacts/tridactyl.xpi
2019-05-31 16:48:53 +01:00
- run: bash -c 'PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest"'
2019-05-15 19:58:06 +02:00
workflows:
version: 2
build_test_lint:
jobs:
- lint
- unit
- e2e