kyuubi/.github/workflows/style.yml
Cheng Pan b2bad04d75 [KYUUBI #1769][FOLLOWUP] Exclude log4j 12 deps from spark-hive and fix detect deps change workflow
### _Why are the changes needed?_

The previous PR did not handle log4j 1.2 deps of `spark-hive`, and the current detect deps change workflow has the dirty cache issue, this PR also fix it.

### _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

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1856 from pan3793/log4j2.

Closes #1769

2785acf4 [Cheng Pan] nit
58affcb5 [Cheng Pan] update workflow
301acb6f [Cheng Pan] update check deps script
7611c7e0 [Cheng Pan] revert exclusion
239e7cc4 [Cheng Pan] Remove duplicated scalatest
e143fecc [Cheng Pan] dependencyList
a7254771 [Cheng Pan] [KYUUBI #1769][FOLLOWUP] Exclude log4j 12 deps from test deps

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-02-01 23:59:17 +08:00

58 lines
2.1 KiB
YAML

name: Style 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 style & dependency issues.
on:
pull_request:
branches:
- master
- branch-*
jobs:
linter:
name: Style and Dependency check
runs-on: ubuntu-20.04
strategy:
matrix:
profiles:
- '-Ptpcds -Pspark-block-cleaner -Pkubernetes-deployment-it -Pspark-3.1 -Pspark-3.2'
steps:
- uses: actions/checkout@v2.3.5
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- name: Scalastyle with Maven
run: build/mvn scalastyle:check ${{ matrix.profiles }}
- name: Upload scalastyle report
if: failure()
run: for log in `find * -name "scalastyle-output.xml"`; do echo "=========$log========="; grep "error" $log; done
- name: JavaStyle with Maven
run: build/mvn spotless:check ${{ matrix.profiles }}
- name: Check dependency list
run: >-
build/mvn clean install -V -Pflink-provided,spark-provided -Dorg.slf4j.simpleLogger.defaultLogLevel=warn \
-Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -DskipTests \
-Pflink-provided,spark-provided \
-pl kyuubi-ctl,kyuubi-server,kyuubi-assembly -am
build/dependency.sh