polyfill-service
Version:
A polyfill combinator
129 lines (107 loc) • 2.65 kB
YAML
version: 2
references:
container_config:
docker:
- image: circleci/node:8
repo_cache_key:
v1-repo-{{ .Branch }}-{{ .Revision }}
restore_repo:
restore_cache:
keys:
-
cache_repo:
save_cache:
key: v1-repo-{{ .Branch }}-{{ .Revision }}
paths:
- .
npm_cache_key:
v1-dependency-npm-{{ checksum "package-lock.json" }}
restore_node_modules:
restore_cache:
keys:
-
cache_node_modules:
save_cache:
key:
paths:
- ./node_modules
jobs:
build:
<<:
steps:
-
- checkout
-
- run:
name: Install Dependencies
command: npm install
-
-
validate_js:
<<:
steps:
-
- run:
name: Validate JS formatting
command: "npm run lint"
validate_vcl:
<<:
steps:
-
- run:
name: Validate VCL
command: "npm run deploy-vcl -- --dryRun"
test_node:
<<:
steps:
-
- run:
name: Test server JS
command: "npm run test-node && npm run test-node-unit && npm run test-integration"
test_polyfills:
<<:
steps:
-
- run:
name: Install Alpine dependencies
command: sudo curl -L -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux32
- run:
name: Test polyfills
command: ".circleci/do-exclusively.sh npm run test-browser-ci"
test_vcl:
<<:
steps:
-
- run:
name: Test vcl
command: "npm run test-vcl"
check_dependencies:
<<:
steps:
-
- run:
name: Check Dependencies conform with the WhiteSource policy
command: "npm run whitesource"
workflows:
version: 2
test:
jobs:
- build
- validate_js:
requires:
- build
- validate_vcl:
requires:
- build
- test_node:
requires:
- build
- test_polyfills:
requires:
- build
- test_vcl:
requires:
- build
- check_dependencies:
requires:
- build