ci: run style unit tests only if we target develop (#27472)
Some tests assume the base branch is develop, but this branch may not have been checked out.
This commit is contained in:
9
.github/workflows/setup_git.sh
vendored
9
.github/workflows/setup_git.sh
vendored
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
git config --global user.email "spack@example.com"
|
||||
git config --global user.name "Test User"
|
||||
# With fetch-depth: 0 we have a remote develop
|
||||
# but not a local branch. Don't do this on develop
|
||||
if [ "$(git branch --show-current)" != "develop" ]
|
||||
then
|
||||
git branch develop origin/develop
|
||||
|
||||
# create a local pr base branch
|
||||
if [[ -n $GITHUB_BASE_REF ]]; then
|
||||
git fetch origin "${GITHUB_BASE_REF}:${GITHUB_BASE_REF}"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user