Skip to content

Commit

Permalink
Merge branch 'main' into renovate/markupsafe-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli authored May 2, 2024
2 parents 645951c + 5d4567f commit 30c7c5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/verify_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
branches:
- main
pull_request:

# do not run this workflow when merging the pull request.
types: [opened, reopened, edited, synchronize]
workflow_dispatch:
name: verify_library_generation
jobs:
Expand All @@ -20,8 +21,10 @@ jobs:
shell: bash
run: |
set -ex
git checkout "${base_ref}"
git checkout "${head_ref}"
git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head.
git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref}
git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head.
git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref}
changed_directories="$(git diff --name-only ${base_ref} ${head_ref})"
if [[ ${changed_directories} =~ "library_generation/" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
Expand Down
3 changes: 1 addition & 2 deletions library_generation/test/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ def __build_image(cls, docker_file: str, cwd: str):

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

Expand Down

0 comments on commit 30c7c5b

Please sign in to comment.