Skip to content

Instantly share code, notes, and snippets.

@therebelrobot
Last active December 12, 2018 22:37
Show Gist options
  • Select an option

  • Save therebelrobot/61a2b3afd15bbc4d2fbbecd8c3ea8230 to your computer and use it in GitHub Desktop.

Select an option

Save therebelrobot/61a2b3afd15bbc4d2fbbecd8c3ea8230 to your computer and use it in GitHub Desktop.

Revisions

  1. therebelrobot revised this gist Dec 12, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .circleci-config.yml
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    # change task:steps:run:command to the bash command to run
    # change workflows:repeated:triggers:schedule:cron to the appropriate cron syntax
    # cron reference: https://www.unix.com/man-page/POSIX/1posix/crontab/
    # cron recipes: https://alvinalexander.com/linux/unix-linux-crontab-every-minute-hour-day-syntax

    defaults: &defaults
    docker:
  2. therebelrobot revised this gist Dec 12, 2018. No changes.
  3. therebelrobot created this gist Dec 12, 2018.
    60 changes: 60 additions & 0 deletions .circleci-config.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    # change defaults:docker:image for a different docker image
    # change jobs:checkout:steps:restore_cache:keys and :save_cache:key to the file needed for checksum
    # change jobs:checkout:steps:run to whatever is needed for dep installation
    # change jobs:checkout:steps:save_cache:paths to the paths you'd like to cache between runs
    # change task:steps:run:command to the bash command to run
    # change workflows:repeated:triggers:schedule:cron to the appropriate cron syntax
    # cron reference: https://www.unix.com/man-page/POSIX/1posix/crontab/

    defaults: &defaults
    docker:
    - image: circleci/node:8.11-jessie-browsers
    working_directory: ~/tmp/circlci-now

    version: 2
    jobs:
    checkout:
    <<: *defaults
    steps:
    - checkout
    - attach_workspace:
    at: ~/tmp/circlci-now
    - restore_cache:
    keys:
    - npm-cache-{{ .Branch }}-{{ checksum "package.json" }}
    - npm-cache-{{ .Branch }}
    - npm-cache-
    - run:
    name: Dependency Install
    command: yarn
    - save_cache:
    key: npm-cache-{{ .Branch }}-{{ checksum "package.json" }}
    paths:
    - node_modules
    - persist_to_workspace:
    root: .
    paths: .
    task:
    <<: *defaults
    steps:
    - attach_workspace:
    at: ~/tmp/circlci-now
    - run:
    name: Run Coverage
    command: |
    ./run-script.sh
    workflows:
    version: 2
    repeated:
    triggers:
    - schedule:
    cron: "0 0 * * *"
    filters:
    branches:
    only:
    - master
    jobs:
    - task
    requires:
    - checkout