justinformentin/lstner

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:8.10.0

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          key: build-temp-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
      - restore_cache:
          key: meteor-release-{{ checksum ".meteor/release" }}-{{ checksum ".circleci/config.yml" }}
      - restore_cache:
          key: meteor-packages-{{ checksum ".meteor/versions" }}-{{ checksum ".circleci/config.yml" }}
      - restore_cache:
          key: npm-packages-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
      - run:
          name: install build essentials
          command: sudo apt-get install -y build-essential
      - run:
          name: restore cached meteor bin
          command: |
            if [ -e ~/build-temp/meteor-bin ]
            then
                echo "Cached Meteor bin found, restoring it"
                sudo cp ~/build-temp/meteor-bin /usr/local/bin/meteor
            else
                echo "No cached Meteor bin found."
            fi
      - run:
          name: install Meteor
          command: |
            # only install meteor if bin isn't found
            command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | /bin/sh

      - run: meteor npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}



      - run: meteor npm build