Skip to content

Commit

Permalink
[HUDI-4754] Add compliance check in github actions (apache#6575)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonvex authored and satishkotha committed Dec 11, 2022
1 parent 6260a8b commit 22f9853
Show file tree
Hide file tree
Showing 4 changed files with 612 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/README.md
@@ -0,0 +1,10 @@
## How to update the Pull Request Template

When updating the pr template, you must consider if updates need to be made to scripts/pr_compliance.py

## What are the files in workflows?
- bot.yml: runs the hudi unit tests with various versions of scala, spark, and flink
- pr_compliance.yml: checks pr titles and main comment to make sure that everything is filled out and formatted properly
- update_pr_compliance: runs the pr_compliance tests when scripts/pr_compliance.py is updated


21 changes: 21 additions & 0 deletions .github/workflows/pr_compliance.yml
@@ -0,0 +1,21 @@
name: validate pr
on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- master

jobs:
validate-pr:
runs-on: ubuntu-latest
env:
REQUEST_BODY: ${{ github.event.pull_request.body }}
REQUEST_TITLE: ${{ github.event.pull_request.title }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: run script
run: python3 scripts/pr_compliance.py > test.log || { echo "::error::pr_compliance.py $(cat test.log)" && exit 1; }



18 changes: 18 additions & 0 deletions .github/workflows/update_pr_compliance.yml
@@ -0,0 +1,18 @@
name: Update Pr Compliance

on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- master
paths:
- scripts/pr_compliance.py

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: run script
run: python3 scripts/pr_compliance.py run-tests > test.log || { echo "::error::pr_compliance.py $(cat test.log)" && exit 1; }

0 comments on commit 22f9853

Please sign in to comment.