Skip to content

Commit

Permalink
[ISSUE #690]Remove extra code style check job in CI (#691)
Browse files Browse the repository at this point in the history
Close ISSUE #690.
  • Loading branch information
ruanwenjun authored Jan 5, 2022
1 parent a1140ab commit 032bb0d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
-->

<!--
(If this PR fixes a GitHub issue, please add `Fixes ISSUE#<XXX>`.)
(If this PR fixes a GitHub issue, please add `Fixes ISSUE #<XXX>`.)
-->

Fixes ISSUE#<XXXX>.
Fixes ISSUE #<XXXX>.

### Motivation

Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ on:
push:
branches:
- develop
- master
- '[0-9]+.[0-9]+.[0-9]+**'
pull_request:
branches:
- develop
- master
- '[0-9]+.[0-9]+.[0-9]+**'
workflow_dispatch:

Expand All @@ -50,34 +52,11 @@ jobs:
java-version: ${{ matrix.java }}

- name: Build
# We use -x check to skip check code style here, since this task will check all files.
# We use Checkstyle task to check the added file
run: ./gradlew clean build jar dist jacocoTestReport -x check
run: ./gradlew clean build jar dist jacocoTestReport

- name: Install plugin
run: ./gradlew installPlugin

checkstyle:
name: Checkstyle
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Download checkstyle exectable
run: wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.44/checkstyle-8.44-all.jar > ./checkstyle.jar

- name: Download reviewdog exectable
run: wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b . v0.12.0

- name: Check code style
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
java -jar ./checkstyle.jar -c ./style/checkStyle.xml -f xml ./eventmesh-* \
| ./reviewdog -f=checkstyle -reporter=github-pr-check -filter-mode=added -fail-on-error
license-check:
name: License Check
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void main(String[] args) throws Exception {
.withExtension(Constants.EVENTMESH_MESSAGE_CONST_TTL, String.valueOf(4 * 1000))
.build();
eventMeshHttpProducer.publish(event);
log.info("publish event success content:{}",content);
log.info("publish event success content:{}", content);
}
Thread.sleep(30000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void start() throws Exception {
try {
notifyConsumerManager(consumerGroup, consumerGroupConf);
} catch (Exception e) {
logger.error("notifyConsumerManager error",e);
logger.error("notifyConsumerManager error", e);
}
}

Expand All @@ -158,7 +158,7 @@ public void start() throws Exception {
try {
notifyConsumerManager(consumerGroup, null);
} catch (Exception e) {
logger.error("notifyConsumerManager error",e);
logger.error("notifyConsumerManager error", e);
}

eventMeshHTTPServer.localConsumerGroupMapping.keySet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ public Message request(final Message openMessage, final long timeout) throws Eve
return openMessageProducer.request(openMessage, timeout);
}

public void request(final EventMeshMessage message, final RRCallback rrCallback, final long timeout)
public void request(final EventMeshMessage message, final RRCallback<EventMeshMessage> rrCallback, final long timeout)
throws EventMeshException {
eventMeshMessageProducer.request(message, rrCallback, timeout);
}

public void request(final CloudEvent cloudEvent, final RRCallback rrCallback, final long timeout)
public void request(final CloudEvent cloudEvent, final RRCallback<CloudEvent> rrCallback, final long timeout)
throws EventMeshException {
cloudEventProducer.request(cloudEvent, rrCallback, timeout);
}

public void request(final Message openMessage, final RRCallback rrCallback, final long timeout)
public void request(final Message openMessage, final RRCallback<Message> rrCallback, final long timeout)
throws EventMeshException {
openMessageProducer.request(openMessage, rrCallback, timeout);
}
Expand Down
17 changes: 17 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# 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.
#

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
Expand Down
13 changes: 7 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
# 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
#
# Licensed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
# 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,
Expand Down
13 changes: 7 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem Licensed to the Apache Software Foundation (ASF) under one or more
@rem contributor license agreements. See the NOTICE file distributed with
@rem this work for additional information regarding copyright ownership.
@rem The ASF licenses this file to You under the Apache License, Version 2.0
@rem (the "License"); you may not use this file except in compliance with
@rem the License. You may obtain a copy of the License at
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
Expand Down

0 comments on commit 032bb0d

Please sign in to comment.