Skip to content

stop forked PR to use secrets #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
version: 2.1
commands:
early_return_for_forked_pull_requests:
description: >-
If this build is from a fork, stop executing the current job and return success.
This is useful to avoid steps that will fail due to missing credentials.
steps:
- run:
name: Early return if this build is from a forked PR
command: |
if [ -n "$CIRCLE_PR_NUMBER" ]; then
echo "Nothing to do for forked PRs, so marking this step successful"
circleci step halt
fi
jobs:
build:
docker:
- image: circleci/python:3.6.1

- image: redislabs/redisgraph:edge
port: 6379:6379

working_directory: ~/repo

Expand Down Expand Up @@ -41,8 +53,15 @@ jobs:
command: |
. venv/bin/activate
coverage run test.py
codecov


- early_return_for_forked_pull_requests

- run:
name: codecove
command: |
. venv/bin/activate
codecov

# - store_artifacts:
# path: test-reports
# destination: test-reports
Expand Down