-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add JUnit summaries to CircleCI as well as merged runs #3704
Changes from 10 commits
87777d2
0e71a0d
5cf833e
03efbf2
9bb96a6
21e24e2
bd510b8
83a0272
d4df262
58d46b3
b125a87
8031cf5
9e49f28
44b8127
2c5f22a
3a5ef49
70aa93a
a6f970d
0ee96d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV | ||
source $BASH_ENV | ||
|
||
if [[ -n "${CIRCLE_PR_NUMBER}" ]] | ||
then | ||
# Update PR refs for testing. | ||
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head" | ||
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge" | ||
|
||
# Retrieve the refs | ||
git fetch -u origin ${FETCH_REFS} | ||
|
||
# Checkout PR merge ref. | ||
git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that conflicting PRs don't get a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea -- to be honest, this is just cargo culting. I haven't had any luck finding ANY documentation on the /merge ref, or the |
||
|
||
# Test for merge conflicts. | ||
git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So a comment to explain how this works is going to be necessary. I think this works by:
|
||
|
||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we can't find a CIRCLE_PR_NUMBER then we should probably bail out, rather than pretending we succeeded doing a merge build There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'll bail out upwards (we check if CIRCLE_PR_NUMBER is defined) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then why do we have an if guard? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because it also runs on master/develop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment maybe for us slow people at the back? 0:-) |
||
|
||
# Log what we are | ||
git show -s |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CircleCI tests now run on the potential merge of a PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shebang / comment /
set -e
, pleaseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also chmod +x ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed