Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[ci] cargo-check-benches against different base branches #12557

Merged
merged 1 commit into from
Oct 27, 2022
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
6 changes: 4 additions & 2 deletions scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ cargo-check-benches:
- !reference [.rusty-cachier, before_script]
- !reference [.pipeline-stopper-vars, script]
# merges in the master branch on PRs
- |
export BASE=$(curl -s -H "Authorization: Bearer ${GITHUB_PR_TOKEN}" https://api.github.com/repos/paritytech/substrate/pulls/${$CI_COMMIT_REF_NAME} | jq .base.ref)
- if [ $CI_COMMIT_REF_NAME != "master" ]; then
git fetch origin +master:master;
git fetch origin +${BASE}:${BASE};
git fetch origin +$CI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME;
git checkout master;
git checkout ${BASE};
git config user.email "ci@gitlab.parity.io";
git merge $CI_COMMIT_REF_NAME --verbose --no-edit;
fi
Expand Down