Skip to content

Commit

Permalink
Merge pull request #62 from vinlee19/dev
Browse files Browse the repository at this point in the history
[feat](ci) add ci workflow
  • Loading branch information
jeff-zou authored Jan 19, 2025
2 parents 22b7246 + 1412fea commit b9818c9
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-redis-connector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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: Build Redis Connector
on:
pull_request:
push:

jobs:
build-extension:
name: "Build Connector"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup java
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: '8'

- name: Build flink connector 1.15
run: |
mvn clean package -DskipTests \
-Dflink.version=1.15.0
46 changes: 46 additions & 0 deletions .github/workflows/checkstyle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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: Code Style Checker

on:
pull_request:
push:
branches:
- dev

jobs:
java-checkstyle:
name: "CheckStyle"
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive

- name: Setup java
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: '8'

- name: Run java checkstyle
run:
mvn clean compile checkstyle:checkstyle
36 changes: 36 additions & 0 deletions .github/workflows/license-eyes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
#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: License Check
on:
pull_request:
push:
branches:
- dev
jobs:
license-check:
name: "License Check"
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
- name: Check License
uses: apache/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testSinkValueWithExpire() throws Exception {

String sink =
"create table sink_redis(name varchar, level varchar, age varchar) with ( "
+ sigleWith()
+ singleWith()
+ "'ttl'='10', '"
+ REDIS_COMMAND
+ "'='"
Expand Down Expand Up @@ -74,7 +74,7 @@ public void testSinkValueWithExpireOnKeyPresent() throws Exception {

String dim =
"create table sink_redis(name varchar, level varchar, age varchar) with ( "
+ sigleWith()
+ singleWith()
+ " 'ttl'='8', 'ttl.key.not.absent'='true', '"
+ REDIS_COMMAND
+ "'='"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testSinkLimitLettucePool() throws Exception {

String sink =
"create table sink_redis(name varchar, level varchar, age varchar) with ( "
+ sigleWith()
+ singleWith()
+ "'ttl'='10', '"
+ REDIS_COMMAND
+ "'='"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static void stopSingle() {
redisClient.shutdown();
}

protected String sigleWith() {
protected String singleWith() {
return "'connector'='redis', "
+ "'host'='"
+ REDIS_HOST
Expand Down
17 changes: 17 additions & 0 deletions style/spotless-formatter.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
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.
-->
<profiles version="13">
<profile kind="CodeFormatterProfile" name="'Flink Connector for Redis'" version="13">
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
Expand Down

0 comments on commit b9818c9

Please sign in to comment.