Skip to content

Commit

Permalink
Fetch release branches so that we can figure out the release branch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverholworthy authored Feb 3, 2023
1 parent 84da77a commit ae5f305
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
branch=main
if [[ $ref_type == "tag"* ]]
then
# fetch release branches (the branch name is not automatically fetched by the actions/checkout step)
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
# find the release branch that we're pointing at
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
fi
tox -e test-cpu -- $branch
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
branch=main
if [[ $ref_type == "tag"* ]]
then
# fetch release branches (the branch name is not automatically fetched by the actions/checkout step)
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
# find the release branch that we're pointing at
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
fi
cd ${{ github.workspace }}; tox -e test-gpu -- $branch

0 comments on commit ae5f305

Please sign in to comment.