tridactyl/.circleci/config.yml

67 lines
2 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
2019-09-23 07:46:13 +01:00
- run: bash -c 'GLOBIGNORE="node_modules" shellcheck -e2012 **/*.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'
2020-02-19 11:32:30 +00:00
mozilla:
docker:
- image: circleci/node:latest
steps:
- commoncmd
2020-02-19 11:41:54 +00:00
- run: bash -c 'cd build; "$(yarn bin)/web-ext" lint'
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
- run: sudo yarn global add 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
# selenium is temperamental - give it lots of chances to succeed
- run: bash -c 'PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest" ||
PATH="$HOME/firefox:$PATH" "$(yarn bin)/jest"'
2019-05-15 19:58:06 +02:00
workflows:
version: 2
build_test_lint:
jobs:
- lint
2020-02-19 11:32:30 +00:00
- mozilla
2019-05-15 19:58:06 +02:00
- unit
- e2e