Move from travis-ci to circle-ci

This commit is contained in:
glacambre 2019-05-15 19:58:06 +02:00
parent cdf8fc16db
commit d27ae80af9
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
2 changed files with 46 additions and 21 deletions

46
.circleci/config.yml Normal file
View file

@ -0,0 +1,46 @@
version: 2.1
commands:
commoncmd:
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run: npm run build
jobs:
lint:
docker:
- image: circleci/node:latest
steps:
# - run: sudo apt update
# - run: sudo apt install -qq shellcheck
- commoncmd
# - run: bash -c 'GLOBIGNORE="node_modules" shellcheck **/*.sh'
- run: npm run lint
- run: bash -c '"$(npm bin)/tslint" --project .'
unit:
docker:
- image: circleci/node:latest
steps:
- commoncmd
- run: bash -c '"$(npm bin)/jest" --silent src'
e2e:
docker:
- image: circleci/node:latest
steps:
- commoncmd
- run: bash -c '"$(npm bin)/web-ext" build --source-dir ./build --overwrite-dest'
- run: mv web-ext-artifacts/*.zip web-ext-artifacts/tridactyl.xpi
- run: bash -c '"$(npm bin)/jest" --silent'
workflows:
version: 2
build_test_lint:
jobs:
- lint
- unit
- e2e

View file

@ -1,21 +0,0 @@
language: node_js
node_js:
- node
cache:
directories:
- node_modules
script:
- bash -c 'GLOBIGNORE="node_modules" shellcheck **/*.sh'
- npm install
- npm run test
- npm run lint
- bash -c '"$(npm bin)/tslint" --project .'
notifications:
webhooks:
urls:
- secure: JMDwcT11GIiLITD48xmVzJtncMPBr/EU0BXCn30oD/i/+tYnAlg/08/6zf22x08cy34saxDEy4+fQnpRG1ConITb2eAGvh2olTuQCIGUYMQvGzd5BX23keNe7VbflJrKKRdbhOZ0wPJRb7mUPbtFbKlAl35WnGMaf/3Dz1yfAx/znBVmAoPQ0LN+VLfp2KzIFAclWhtZluJjbKgFixZCbrS/6tQruYQnWN2+6LPR+jcxltpQaRsXy6HGg9kGGPZCBbPOVZl5PCpkrFCilzD4OQTy7Vc9i5xFBIM9lVDA5/K5l4eEtAMcvCHUz2HdGyJwK5eAPYVeXZYjIdrEEbjxstUuj1Y6aCJYuJAb9wKYCELRDP4XXl/8qR0QUF3VrvADe0tsaYzJow/CvzZ7/8zEzYmn0FO27BC/7mQBgMROucswbRD/BEAkZwXtk5CFFTffZX+daZ1Kfe8uAGlnCPZQWeUUmsiLe34VbKjEjzQ2aP7K+0vHgQQUtxoA2Cey6N90PCSMFklHDAy2Rv+7aPUXNu+zOFSmPhurL0/P5cu3uovHWitc+gEd1mGHSY5XIe+n2zz1bY6j9sx4O8mEhTBRRDTOSIbmv8kEhVcTvy3FQdyw5NYCTkdjy6MNLHXtjsQjTZmY72o3ZtaSxQCEAQ3c1SLUGpnpqx2qPb7t8mxuiSc=
on_success: change # always|never|change
on_failure: always
on_start: never