Skip to content

Commit

Permalink
Add required check (#2287)
Browse files Browse the repository at this point in the history
* Refactor : refactor the workflow to apploy required check

* Add : add branch limit

* Refactor : remove uesless needs

* Refactor : rename the job in workflow
  • Loading branch information
taojintianxia authored Oct 14, 2023
1 parent 045858a commit 4523d9e
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/required-check.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4523d9e

Please sign in to comment.