sourcecred/.circleci/config.yml
William Chargin bf35161d87
ci: run test_full on all merges to master (#976)
Summary:
We currently run quicktest on pull requests, quicktest again on commits
_after_ they are merged into `master`, and fulltest nightly. This commit
retains quicktest on pull requests, but switches to fulltest once a
commit is merged into master. We still run fulltest nightly as well, to
detect any changes in remote APIs that we hit.

Test Plan:
Push this commit. Check that Circle CI runs its workflow normally (as
quicktest), verifying that the config parses correctly. Then, merge this
commit, and verify that the full tests have run.

wchargin-branch: ci-test-full-on-master
2018-11-01 10:57:53 -07:00

63 lines
1.4 KiB
YAML

# JavaScript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
# See https://circleci.com/docs/2.0/config-intro/#section=configuration for spec
#
version: 2.1
executors:
sourcecred_node:
docker:
- image: circleci/node:8.12.0
working_directory: ~/repo
commands:
set_up_node_modules:
description: "load node_modules, updating and storing back into cache if necessary"
steps:
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fall back to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
jobs:
test:
executor: sourcecred_node
steps:
- checkout
- set_up_node_modules
- run: yarn test
test_full:
executor: sourcecred_node
steps:
- checkout
- set_up_node_modules
- run: yarn test --full
workflows:
version: 2
commit:
jobs:
- test
- test_full:
filters:
branches:
only:
- master
nightly:
triggers:
- schedule:
cron: "0 22 * * *" # 22:00 UTC
filters:
branches:
only:
- master
jobs:
- test_full