Skip to content

Commit 6411888

Browse files
committed
[KYUUBI #1720] Extract scalastyle workflow to a single yml and disable it in other jobs
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html 2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'. 3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'. --> ### _Why are the changes needed?_ <!-- Please clarify why the changes are needed. For instance, 1. If you add a feature, you can talk about the use case of it. 2. If you fix a bug, you can clarify why it is a bug. --> quick fail on style issue and reduce ga overhead ### _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 ``` =========dev/kyuubi-tpcds/target/scalastyle-output.xml========= =========dev/kyuubi-extension-spark-3-1/target/scalastyle-output.xml========= =========dev/kyuubi-extension-spark-common/target/scalastyle-output.xml========= =========dev/kyuubi-extension-spark-3-2/target/scalastyle-output.xml========= =========externals/kyuubi-download/target/scalastyle-output.xml========= =========externals/kyuubi-trino-engine/target/scalastyle-output.xml========= =========externals/kyuubi-spark-sql-engine/target/scalastyle-output.xml========= =========externals/kyuubi-flink-sql-engine/target/scalastyle-output.xml========= =========kubernetes/integration-tests/target/scalastyle-output.xml========= =========kyuubi-assembly/target/scalastyle-output.xml========= =========kyuubi-common/target/scalastyle-output.xml========= <error line="22" source="org.scalastyle.file.FileLineLengthChecker" severity="error" message="File line length exceeds 100 characters"/> =========kyuubi-ctl/target/scalastyle-output.xml========= =========kyuubi-ha/target/scalastyle-output.xml========= =========kyuubi-metrics/target/scalastyle-output.xml========= =========kyuubi-server/target/scalastyle-output.xml========= =========kyuubi-zookeeper/target/scalastyle-output.xml========= =========target/scalastyle-output.xml========= =========tools/spark-block-cleaner/target/scalastyle-output.xml========= ``` Closes #1720 from yaooqinn/style. Closes #1720 36ca398 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs d83b807 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs 7366ca8 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs a0b44e2 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs Authored-by: Kent Yao <yao@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
1 parent d2f10e9 commit 6411888

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
${{ runner.os }}-maven-io-
7777
- name: Build with Maven
7878
run: >-
79-
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
79+
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
8080
-Pspark-${{ matrix.spark }} -Pspark-hadoop-${{ matrix.spark-hadoop }} ${{ matrix.profiles }}
8181
- name: Code coverage
8282
if: ${{ matrix.codecov == 'true' }}
@@ -135,7 +135,7 @@ jobs:
135135
${{ runner.os }}-maven-io-
136136
- name: Run TPC-DS Tests
137137
run: >-
138-
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
138+
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
139139
-pl kyuubi-server -am
140140
-Pspark-3.1
141141
-Dmaven.plugin.scalatest.exclude.tags=''
@@ -176,7 +176,7 @@ jobs:
176176
run: kubectl get pods
177177
- name: integration tests
178178
run: >-
179-
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
179+
./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
180180
-pl kubernetes/integration-tests -am
181181
-Pkubernetes
182182
-Dtest=none -DwildcardSuites=org.apache.kyuubi.kubernetes.test

.github/workflows/style.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Style check
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
# This GitHub workflow checks Apache License v2.0 Header is added if needed
21+
22+
23+
on:
24+
pull_request:
25+
branches:
26+
- master
27+
- branch-*
28+
29+
jobs:
30+
lint-scala:
31+
name: Scala style check
32+
runs-on: ubuntu-20.04
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Setup JDK 8
36+
uses: actions/setup-java@v2
37+
with:
38+
distribution: zulu
39+
java-version: 8
40+
- name: Scalastyle with Maven
41+
run: build/mvn scalastyle:check -Ptpcds -Pspark-block-cleaner -Pkubernetes -Pspark-3.1 -Pspark-3.2
42+
- name: Upload scalastyle report
43+
if: failure()
44+
run: for log in `find * -name "scalastyle-output.xml"`; do echo "=========$log========="; grep "error" $log; done

0 commit comments

Comments
 (0)