This is an automated email from the ASF dual-hosted git repository.
yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 5f5c3c1e71c Add beam_PreCommit_RAT job (#27423)
5f5c3c1e71c is described below
commit 5f5c3c1e71cc5857dccbaa3ec9ffee93776c4015
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Tue Jul 11 18:44:30 2023 +0400
Add beam_PreCommit_RAT job (#27423)
* Add Beam PreCommit RAT job
* Add RAT PreCommit workflow to README
* Add name for Checkout step
* Change Precommit to PreCommit
---
.github/workflows/README.md | 13 +++++----
.github/workflows/beam_PreCommit_Go.yml | 2 +-
...honAutoformatter.yml => beam_PreCommit_RAT.yml} | 33 +++++++++++-----------
.../job_PreCommit_PythonAutoformatter.yml | 4 +--
.github/workflows/job_Precommit_PythonLint.yml | 2 +-
5 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index d510ec2fd88..ffbb49c6367 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -18,13 +18,14 @@ Please note that jobs with matrix need to have matrix
element in the comment. Ex
```Run Python PreCommit (3.8)```
| Workflow name | Matrix | Trigger Phrase | Cron Status |
|:-------------:|:------:|:--------------:|:-----------:|
-| [ Go Precommit
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) | N/A
|`Run Go PreCommit`| [](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml)
|
-| [ Python PreCommit Docker
](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml)
| ['3.8','3.9','3.10','3.11'] | `Run PythonDocker PreCommit (matrix_element)`|
[](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml)
|
-| [ Python Precommit Formatter
](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml)
| N/A | `Run PythonFormatter PreCommit`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml)
|
-| [ Python PreCommit Coverage
](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml)
| N/A | `Run Python_Coverage PreCommit`|
[](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml)
|
+| [ Go PreCommit
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) | N/A
|`Run Go PreCommit`| [](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml)
|
+| [ Python PreCommit Docker
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_DockerBuild.yml)
| ['3.8','3.9','3.10','3.11'] | `Run PythonDocker PreCommit (matrix_element)`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_DockerBuild.yml)
|
+| [ Python PreCommit Formatter
](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml)
| N/A | `Run PythonFormatter PreCommit`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml)
|
+| [ Python PreCommit Coverage
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Coverage.yml)
| N/A | `Run Python_Coverage PreCommit`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Coverage.yml)
|
| [ Python PreCommit Dataframes
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml)
| ['3.8','3.9','3.10','3.11'] | `Run Python_Dataframes PreCommit
(matrix_element)`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml)
|
| [ Python PreCommit Examples
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml)
| ['3.8','3.9','3.10','3.11'] | `Run Python_Examples PreCommit
(matrix_element)` |
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml)
|
| [ Python PreCommit Runners
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml)
| ['3.8','3.9','3.10','3.11'] | `Run Python_Runners PreCommit
(matrix_element)`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml)
|
-| [ Python PreCommit Lint
](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml)
| N/A | `Run PythonLint PreCommit` |
[](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml)
|
+| [ Python PreCommit Lint
](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonLint.yml)
| N/A | `Run PythonLint PreCommit` |
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonLint.yml)
|
| [ Python PreCommit Transforms
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml)
| ['3.8','3.9','3.10','3.11'] | `Run Python_Transforms PreCommit
(matrix_element)`|
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml)
|
-| [ Python PreCommit
](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml) |
['3.8','3.9','3.10','3.11'] | `Run Python PreCommit (matrix_element)` |
[](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml)
|
+| [ Python PreCommit
](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python.yml) |
['3.8','3.9','3.10','3.11'] | `Run Python PreCommit (matrix_element)` |
[](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python.yml)
|
+| [ RAT PreCommit
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_RAT.yml) |
N/A | `Run RAT PreCommit` |
[](https://github.com/apache/beam/actions/workflows/beam_PreCommit_RAT.yml)
|
diff --git a/.github/workflows/beam_PreCommit_Go.yml
b/.github/workflows/beam_PreCommit_Go.yml
index be76e1239d3..3e32873d6d8 100644
--- a/.github/workflows/beam_PreCommit_Go.yml
+++ b/.github/workflows/beam_PreCommit_Go.yml
@@ -1,4 +1,4 @@
-name: Go Precommit
+name: Go PreCommit
on:
push:
diff --git a/.github/workflows/job_PreCommit_PythonAutoformatter.yml
b/.github/workflows/beam_PreCommit_RAT.yml
similarity index 76%
copy from .github/workflows/job_PreCommit_PythonAutoformatter.yml
copy to .github/workflows/beam_PreCommit_RAT.yml
index 2c1702f057a..d513c01ceb0 100644
--- a/.github/workflows/job_PreCommit_PythonAutoformatter.yml
+++ b/.github/workflows/beam_PreCommit_RAT.yml
@@ -12,17 +12,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-name: Python Precommit Formatter
+
+name: Beam PreCommit RAT
+
on:
- pull_request_target:
- branches: [ "master", "release-*" ]
- paths: [ "sdks/python/apache_beam/**"]
- issue_comment:
- types: [created]
push:
tags: ['v*']
branches: ['master', 'release-*']
- paths: [
"sdks/python/apache_beam/**",".github/workflows/job_PreCommit_PythonAutoformatter.yml"]
+ pull_request_target:
+ branches: ['master', 'release-*']
+ issue_comment:
+ types: [created]
schedule:
- cron: '* */6 * * *'
#Setting explicit permissions for the action to avoid the default permissions
which are `write-all` in case of pull_request_target event
@@ -42,19 +42,21 @@ permissions:
statuses: read
jobs:
- beam_PreCommit_PythonFormatter:
+ beam_PreCommit_RAT:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
- github.event.comment.body == 'Run PythonFormatter PreCommit' ||
+ github.event.comment.body == 'Run RAT PreCommit' ||
github.event_name == 'schedule'
- runs-on: [self-hosted, ubuntu-20.04, main]
+ runs-on: [self-hosted, ubuntu-20.04]
+ name: beam_PreCommit_RAT
steps:
- - uses: actions/checkout@v3
+ - name: Check out repository code
+ uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Rerun on comment
- if: github.event.comment.body == 'Run PythonFormatter PreCommit'
+ if: github.event.comment.body == 'Run RAT PreCommit'
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
@@ -67,12 +69,9 @@ jobs:
with:
distribution: 'zulu'
java-version: '8'
- - uses: actions/setup-python@v4
- with:
- python-version: '3.8'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- - name: run PythonDockerPrecommit script
- run: ./gradlew :pythonFormatterPreCommit
+ - name: run RAT script
+ run: ./gradlew :rat
\ No newline at end of file
diff --git a/.github/workflows/job_PreCommit_PythonAutoformatter.yml
b/.github/workflows/job_PreCommit_PythonAutoformatter.yml
index 2c1702f057a..f41e5be05d6 100644
--- a/.github/workflows/job_PreCommit_PythonAutoformatter.yml
+++ b/.github/workflows/job_PreCommit_PythonAutoformatter.yml
@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-name: Python Precommit Formatter
+name: Python PreCommit Formatter
on:
pull_request_target:
branches: [ "master", "release-*" ]
@@ -74,5 +74,5 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- - name: run PythonDockerPrecommit script
+ - name: run PythonDockerPreCommit script
run: ./gradlew :pythonFormatterPreCommit
diff --git a/.github/workflows/job_Precommit_PythonLint.yml
b/.github/workflows/job_Precommit_PythonLint.yml
index d2b0e7919d8..f75c860af19 100644
--- a/.github/workflows/job_Precommit_PythonLint.yml
+++ b/.github/workflows/job_Precommit_PythonLint.yml
@@ -77,5 +77,5 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- - name: run PythonLintPrecommit script
+ - name: run PythonLintPreCommit script
run: ./gradlew :pythonLintPreCommit