forked from danthareja/contribute-to-open-source
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bad0f18
commit 1d6c581
Showing
2 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.