Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix SemVer check base commit #5361

Merged
merged 33 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 19 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
1 change: 1 addition & 0 deletions .github/scripts/generate-prdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def create_prdoc(pr, audience, title, description, patch, bump, force):
# write the parsed PR documentation back to the file
with open(path, "w") as f:
yaml.dump(prdoc, f)
print(f"PrDoc for PR {pr} written to {path}")

def parse_args():
parser = argparse.ArgumentParser()
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,33 @@ concurrency:
env:
TOOLCHAIN: nightly-2024-06-01


jobs:
check-semver:
runs-on: ubuntu-latest
container:
image: docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.head_ref }} # Check out the actual changes - not the merge commit.
fetch-depth: 0

- name: extra git setup
env:
BASE: ${{ github.event.pull_request.base.sha }}
BASE_BRANCH: ${{ github.base_ref }}
run: |
set -eux
git config --global --add safe.directory '*'
echo "hi"
git fetch --no-tags --no-recurse-submodules --depth=1 origin ${{ github.event.pull_request.base.sha }}
git fetch --no-tags --no-recurse-submodules --depth=1 origin master
echo "hi2 'git merge-base origin/master HEAD --fork-point'"
git merge-base --fork-point origin/$BASE_BRANCH
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
echo "hi3"
BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
echo "Setting BASE to $BASE"
git fetch --no-tags --no-recurse-submodules --depth=1 origin $BASE
echo "Fetched base, branching off"
git branch old $BASE

- name: Comment If Backport
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/command-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,21 @@ concurrency:
cancel-in-progress: true

jobs:
set-image:
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
cmd-prdoc:
needs: [set-image]
runs-on: ubuntu-latest
timeout-minutes: 20
container:
image: ${{ needs.set-image.outputs.IMAGE }}
permissions:
contents: write
pull-requests: write
Expand All @@ -63,6 +75,7 @@ jobs:
python3 -m pip install -q cargo-workspace PyGithub whatthepatch pyyaml toml

python3 .github/scripts/generate-prdoc.py --pr "${{ inputs.pr }}" --bump "${{ inputs.bump }}" --audience "${{ inputs.audience }}" --force "${{ inputs.overwrite }}"
git diff

- name: Report failure
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/test/tests/storage_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use sp_runtime::{
traits::{BlakeTwo256, Verify},
TransactionOutcome,
};

// FAIL-CI dummy change
pub use self::pallet::*;

#[frame_support::pallet]
Expand Down
Loading