alessandrocuzzocrea/chip-8-emulator-js

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2
jobs:
  build:
    docker:
      - image: circleci/node:9.4.0-stretch

    working_directory: ~/tmp

    steps:
      - checkout

      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      
      - run:
          name: Setup Code Climate test-reporter
          command: |
            curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
            chmod +x ./cc-test-reporter

      - run:
          name: Run tests
          command: |
            ./cc-test-reporter before-build
            npm run coverage
            ./cc-test-reporter after-build --exit-code $?

      - run: npm run coveralls