Skip to content

Commit 30c7c5b

Browse files
authored
Merge branch 'main' into renovate/markupsafe-2.x
2 parents 645951c + 5d4567f commit 30c7c5b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/verify_library_generation.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ on:
33
branches:
44
- main
55
pull_request:
6-
6+
# do not run this workflow when merging the pull request.
7+
types: [opened, reopened, edited, synchronize]
78
workflow_dispatch:
89
name: verify_library_generation
910
jobs:
@@ -20,8 +21,10 @@ jobs:
2021
shell: bash
2122
run: |
2223
set -ex
23-
git checkout "${base_ref}"
24-
git checkout "${head_ref}"
24+
git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head.
25+
git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref}
26+
git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head.
27+
git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref}
2528
changed_directories="$(git diff --name-only ${base_ref} ${head_ref})"
2629
if [[ ${changed_directories} =~ "library_generation/" ]]; then
2730
echo "should_run=true" >> $GITHUB_OUTPUT

library_generation/test/integration_tests.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ def __build_image(cls, docker_file: str, cwd: str):
190190

191191
@classmethod
192192
def __remove_generated_files(cls):
193-
# uncomment this line when the generated files don't owned by root.
194-
# shutil.rmtree(f"{output_dir}", ignore_errors=True)
193+
shutil.rmtree(f"{output_dir}", ignore_errors=True)
195194
if os.path.isdir(f"{golden_dir}"):
196195
shutil.rmtree(f"{golden_dir}")
197196

0 commit comments

Comments
 (0)