You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/11/01 01:50:25 UTC
[servicecomb-samples] 02/02: add github action to run integration tests
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-samples.git
commit 2aaabb33e0d88c411872f00f91ee1e6e5e32336f
Author: liubao <bi...@qq.com>
AuthorDate: Tue Nov 1 09:46:02 2022 +0800
add github action to run integration tests
---
.github/workflows/maven.yml | 48 ++++++++++++++++++++++++++++++++
java-chassis-integration-tests/README.md | 14 +++++-----
scripts/build.sh | 34 ++++++++++++++++++++++
3 files changed, 89 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..3adaf22
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,48 @@
+#
+# 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: Java CI with Maven
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up jdk
+ uses: actions/setup-java@v3
+ with:
+ java-version: '8'
+ distribution: 'temurin'
+ - uses: actions/cache@v3
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Compilation and Installation
+ run: bash scripts/build.sh
diff --git a/java-chassis-integration-tests/README.md b/java-chassis-integration-tests/README.md
index 5568c7b..b858572 100644
--- a/java-chassis-integration-tests/README.md
+++ b/java-chassis-integration-tests/README.md
@@ -1,9 +1,9 @@
-This module contains integrated test cases. Running these test cases, should include profile
+This module contains integrated test cases.
-```shell script
--Pit
-```
+# How to use
-[java-chassis-samples][java-chassis-samples] project provides a lot of samples.
-
-[java-chassis-samples]: https://github.com/apache/servicecomb-samples/tree/master/java-chassis-samples
+When release servicecomb-java-chassis
+
+* change pom.xml parent version to release version.
+* change revision to release version.
+* change repository to stage repository
diff --git a/scripts/build.sh b/scripts/build.sh
new file mode 100644
index 0000000..f7f18ae
--- /dev/null
+++ b/scripts/build.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+#bin/sh
+
+## whenever commit to the repository, do Compilation and Installation
+
+CUR_DIR=$PWD
+
+## run java-chassis-integration-tests
+cd $CUR_DIR/java-chassis-integration-tests
+mvn clean install
+if [ $? == 0 ]; then
+ echo "${green}Installation Success..${reset}"
+else
+ echo "${red}Installation or Test Cases failed, please check the above logs for more details.${reset}"
+ exit 1
+fi
+
+echo "Compilation and Installation Completed"