This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git
The following commit(s) were added to refs/heads/master by this push:
new 4523d9e53 Add required check (#2287)
4523d9e53 is described below
commit 4523d9e53343ee91b617f2c632a8e051ab91250e
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Sat Oct 14 19:38:37 2023 +0800
Add required check (#2287)
* Refactor : refactor the workflow to apploy required check
* Add : add branch limit
* Refactor : remove uesless needs
* Refactor : rename the job in workflow
---
.github/workflows/maven.yml | 7 ++++-
.github/workflows/required-check.yml | 55 ++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 297d59517..334e5ef59 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -46,9 +46,14 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- - name: Build with Maven
+ - name: Build with Maven in Windows
+ if: matrix.os == 'windows-latest'
run: |
./mvnw --batch-mode --no-transfer-progress
'-Dmaven.javadoc.skip=true' clean install
+ - name: Build with Maven in Linux or macOS
+ if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
+ run: |
+ ./mvnw --batch-mode --no-transfer-progress
'-Dmaven.javadoc.skip=true' clean install -Pcheck
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.java == '8'
uses: codecov/codecov-action@v3
diff --git a/.github/workflows/required-check.yml
b/.github/workflows/required-check.yml
new file mode 100644
index 000000000..229dc8df4
--- /dev/null
+++ b/.github/workflows/required-check.yml
@@ -0,0 +1,55 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: Required - Check
+
+on:
+ pull_request:
+ branches: [ master ]
+ workflow_dispatch:
+
+concurrency:
+ group: check-${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ check-checkstyle:
+ name: Check - CheckStyle
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run CheckStyle
+ run: ./mvnw checkstyle:check -Pcheck -T1C
+
+ check-spotless:
+ name: Check - Spotless
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run Spotless
+ run: ./mvnw spotless:check -Pcheck -T1C
+
+ check-license:
+ name: Check - License
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run Apache Rat
+ run: ./mvnw apache-rat:check -Pcheck -T1C