From ee4473da3f855b294afe47a7920dee9a9258ea56 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Tue, 11 Jan 2022 12:15:22 +0800 Subject: [PATCH] [KYUUBI #1718] Extract rat workflow to a single yml and disable it in other jobs ### _Why are the changes needed?_ ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1718 from yaooqinn/rat2. Closes #1718 c19ba09d [Kent Yao] Extract rat workflow to a single yml and disable it in other jobs 7436964c [Kent Yao] Extract rat workflow to a single yml and disable it in other jobs 8e5f127e [Kent Yao] Extract rat workflow to a single yml and disable it in other jobs 83f08173 [Kent Yao] Extract rat workflow to a single yml and disable it in other jobs Authored-by: Kent Yao Signed-off-by: Kent Yao --- .github/workflows/license.yml | 46 +++++++++++++++++++++++++++++++++++ .github/workflows/master.yml | 23 +++--------------- 2 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/license.yml diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 000000000..775b57e4f --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,46 @@ +name: License check + +# +# 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. +# + +# This GitHub workflow checks Apache License v2.0 Header is added if needed + + +on: + pull_request: + branches: + - master + - branch-* + +jobs: + rat: + name: License + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Setup JDK 8 + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + - run: build/mvn org.apache.rat:apache-rat-plugin:check -Ptpcds -Pspark-block-cleaner -Pkubernetes -Pspark-3.1 -Pspark-3.2 + - name: Upload rat report + if: failure() + uses: actions/upload-artifact@v2 + with: + name: rat-report + path: "**/target/rat*.txt" diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 713a6d008..a4ec82d9f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,23 +11,6 @@ on: - branch-* jobs: - rat: - name: Check License - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Setup JDK 8 - uses: actions/setup-java@v2 - with: - distribution: zulu - java-version: 8 - - run: build/mvn org.apache.rat:apache-rat-plugin:check - - name: Upload rat report - if: failure() - uses: actions/upload-artifact@v2 - with: - name: rat - path: "**/target/rat*.txt" build: name: Build @@ -93,7 +76,7 @@ jobs: ${{ runner.os }}-maven-io- - name: Build with Maven run: >- - ./build/mvn clean install -Dmaven.javadoc.skip=true -V + ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V -Pspark-${{ matrix.spark }} -Pspark-hadoop-${{ matrix.spark-hadoop }} ${{ matrix.profiles }} - name: Code coverage if: ${{ matrix.codecov == 'true' }} @@ -152,7 +135,7 @@ jobs: ${{ runner.os }}-maven-io- - name: Run TPC-DS Tests run: >- - ./build/mvn clean install -Dmaven.javadoc.skip=true -V + ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V -pl kyuubi-server -am -Pspark-3.1 -Dmaven.plugin.scalatest.exclude.tags='' @@ -193,7 +176,7 @@ jobs: run: kubectl get pods - name: integration tests run: >- - ./build/mvn clean install -Dmaven.javadoc.skip=true -V + ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V -pl kubernetes/integration-tests -am -Pkubernetes -Dtest=none -DwildcardSuites=org.apache.kyuubi.kubernetes.test