Skip to content

Commit

Permalink
Test2
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 30, 2019
1 parent 27ef807 commit 508fff7
Showing 1 changed file with 68 additions and 14 deletions.
82 changes: 68 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,74 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:10-stretch-browsers
version: 2.1

commands:
install:
parameters:
install-commands:
description: "Steps that will be executed before the tests"
type: steps
default: []
steps:
- checkout
- restore_cache:
keys:
- npm-deps-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "package-lock.json" }}
- run:
name: Installing dependencies
command: npm ci
key: "{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum \".circleci/config.yml\" }}-{{ checksum \"package-lock.json\" }}"
- run: npm ci
- save_cache:
key: npm-deps-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "package-lock.json" }}
key: "{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum \".circleci/config.yml\" }}-{{ checksum \"package-lock.json\" }}"
paths:
- /home/circleci/.npm
- run:
name: Run tests
command: npm test
- ./node_modules/

run-tests:
parameters:
test-commands:
description: "Steps that will be executed after the repo is cloned and dependencies are installed, but before tests are run"
type: steps
default: []
steps:
- run: node --version
- run: npm --version
- run: java -version
- steps: << parameters.test-commands >>

jobs:
node-8:
docker:
- image: circleci/node:8-stretch-browsers
steps:
- install
- run-tests:
test-commands:
- run:
name: Run tests
command: npm test

node-10:
docker:
- image: circleci/node:10-stretch-browsers
steps:
- install
- run-tests:
test-commands:
- run:
name: Run tests
command: npm test
- run:
name: Run BrowserStack tests
command: |
if [[ -z "$CIRCLE_PULL_REQUEST" && ! `git log --format=%B --no-merges -n 1 | grep '\[skip browser\]'` ]]; then
npm run js-test-cloud;
fi
- run:
name: Run docs links checking
command: npm run linkinator
- run:
name: Run coveralls
command: npm run coveralls
when: on_success

workflows:
version: 2
test:
jobs:
- node-8
- node-10

0 comments on commit 508fff7

Please sign in to comment.