This is an automated email from the ASF dual-hosted git repository.
xushiyan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hudi-rs.git
The following commit(s) were added to refs/heads/main by this push:
new b3ffa32 chore: improve workflows for code checking and PR (#110)
b3ffa32 is described below
commit b3ffa32fb662b38366ca2fa2b219dbddce31eb42
Author: Shiyan Xu <[email protected]>
AuthorDate: Sat Aug 10 20:00:28 2024 -0500
chore: improve workflows for code checking and PR (#110)
---
.github/workflows/{compliance.yml => code.yml} | 43 ++++++++++----------------
.github/workflows/{compliance.yml => pr.yml} | 38 ++++++-----------------
2 files changed, 26 insertions(+), 55 deletions(-)
diff --git a/.github/workflows/compliance.yml b/.github/workflows/code.yml
similarity index 65%
copy from .github/workflows/compliance.yml
copy to .github/workflows/code.yml
index dcc4973..d0eabff 100644
--- a/.github/workflows/compliance.yml
+++ b/.github/workflows/code.yml
@@ -15,53 +15,44 @@
# specific language governing permissions and limitations
# under the License.
-name: Compliance
+name: Code
on:
- pull_request_target:
- types: [ opened, edited, reopened, synchronize ]
+ push:
+ branches:
+ - main
+ - release/**
+ pull_request:
branches:
- main
-
-permissions:
- contents: read
- pull-requests: write
jobs:
- check-pr:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- node-version: '20.x'
- - name: Linting
- run: |
- npm i -g conventional-changelog-conventionalcommits
- npm i -g commitlint@latest
- echo ${{ github.event.pull_request.title }} | npx commitlint
- - name: Labeling
- uses: actions/labeler@v5
- check-changes:
+ check-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
+
- name: Check license header
uses: apache/skywalking-eyes/[email protected]
+
- name: Check rust code style
run: cd python && make check-rust
- - name: Set up Python ${{ matrix.python-version }}
+
+ - name: Setup Python
uses: actions/setup-python@v5
with:
- python-version: ${{ matrix.python-version }}
+ python-version: '3.8'
cache: pip
cache-dependency-path: pyproject.toml
+
- name: Install python linter dependencies
working-directory: ./python
run: |
- make setup-env
+ make setup-venv
source venv/bin/activate
- pip install ruff mypy
- - name: Run python linter
+ pip install ruff==0.5.2 mypy==1.10.1
+
+ - name: Check python code style
working-directory: ./python
run: |
source venv/bin/activate
diff --git a/.github/workflows/compliance.yml b/.github/workflows/pr.yml
similarity index 58%
rename from .github/workflows/compliance.yml
rename to .github/workflows/pr.yml
index dcc4973..431b201 100644
--- a/.github/workflows/compliance.yml
+++ b/.github/workflows/pr.yml
@@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-name: Compliance
+name: PR
on:
- pull_request_target:
+ pull_request:
types: [ opened, edited, reopened, synchronize ]
branches:
- main
@@ -32,37 +32,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
with:
- node-version: '20.x'
- - name: Linting
+ node-version: 20
+
+ - name: Linting commit
run: |
npm i -g conventional-changelog-conventionalcommits
npm i -g commitlint@latest
echo ${{ github.event.pull_request.title }} | npx commitlint
+
- name: Labeling
uses: actions/labeler@v5
- check-changes:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Check license header
- uses: apache/skywalking-eyes/[email protected]
- - name: Check rust code style
- run: cd python && make check-rust
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
- cache: pip
- cache-dependency-path: pyproject.toml
- - name: Install python linter dependencies
- working-directory: ./python
- run: |
- make setup-env
- source venv/bin/activate
- pip install ruff mypy
- - name: Run python linter
- working-directory: ./python
- run: |
- source venv/bin/activate
- make check-python