This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JUnit summaries to CircleCI as well as merged runs (#3704)
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 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
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,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# CircleCI doesn't give CIRCLE_PR_NUMBER in the environment for non-forked PRs. Wonderful. | ||
# In this case, we just need to do some ~shell magic~ to strip it out of the PULL_REQUEST URL. | ||
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> "$BASH_ENV" | ||
source $BASH_ENV | ||
|
||
if [[ -z "${CIRCLE_PR_NUMBER}" ]] | ||
then | ||
echo "Can't figure out what the PR number is!" | ||
exit 1 | ||
fi | ||
|
||
# Get the reference, using the GitHub API | ||
GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'` | ||
|
||
# Show what we are before | ||
git show -s | ||
|
||
# Fetch and merge. If it doesn't work, it will raise due to set -e. | ||
git fetch -u origin $GITBASE | ||
git merge --no-edit origin/$GITBASE | ||
|
||
# Show what we are after. | ||
git show -s |
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 @@ | ||
CircleCI tests now run on the potential merge of a PR. |