Skip to content

Commit

Permalink
Upgrade to CircleCI 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danthareja committed Aug 29, 2018
1 parent bad0f18 commit 1d6c581
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 12 deletions.
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# DO NOT EDIT THIS FILE!!
version: 2
jobs:
build:
docker:
- image: circleci/node:6.10
steps:
- checkout
- run:
name: Validating PR
command: |
if [ -n "${CIRCLE_PR_NUMBER}" ]; then
curl https://api.github.com/repos/danthareja/contribute-to-open-source/pulls/$CIRCLE_PR_NUMBER > pull.json
node -e "
var pull = require('./pull.json');
if (pull.base.ref !== pull.user.login) {
console.log('Invalid PR');
process.exit(1);
}
"
else
echo "Not a PR build"
exit 1
fi
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: Installing dependencies
command: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: Creating artifacts
command: |
set +e
mkdir /tmp/artifacts
npm run lint --silent -- --format json > /tmp/artifacts/eslint.json
npm test --silent -- --reporter json > /tmp/artifacts/mocha.json
- store_artifacts:
path: /tmp/artifacts
notify:
webhooks:
- url: https://p6bex1idt3.execute-api.us-west-1.amazonaws.com/prod/hooks/circleci
12 changes: 0 additions & 12 deletions circle.yml

This file was deleted.

0 comments on commit 1d6c581

Please sign in to comment.