-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
206 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
name: Koupleless Samples Formatter and Test | ||
run-name: ${{ github.actor }} pushed code | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- runtime-2.0.x | ||
- runtime-2.1.x | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- runtime-2.0.x | ||
- runtime-2.1.x | ||
|
||
# enable manually running the workflow | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-test-for-springboot-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 8 | ||
cache: maven | ||
|
||
- name: Update Maven version to 3.9.x to enable cross bundle without install | ||
env: | ||
MAVEN_VERSION: '3.9.5' | ||
run: | | ||
wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
tar xzvf apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "MAVEN_HOME=$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}" >> $GITHUB_ENV | ||
echo "$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH | ||
- name: Install Runtime | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
|
||
- name: Check code formatter | ||
run: sh ./check_format.sh | ||
|
||
- name: Checkout Samples Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'koupleless/samples' | ||
path: 'samples' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test for springboot samples | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
working-directory: samples/springboot-samples/ | ||
|
||
unit-test-for-sofaboot-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 8 | ||
cache: maven | ||
|
||
- name: Update Maven version to 3.9.x to enable cross bundle without install | ||
env: | ||
MAVEN_VERSION: '3.9.5' | ||
run: | | ||
wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
tar xzvf apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "MAVEN_HOME=$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}" >> $GITHUB_ENV | ||
echo "$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH | ||
- name: Install Runtime | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
|
||
- name: Check code formatter | ||
run: sh ./check_format.sh | ||
|
||
- name: Checkout Samples Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'koupleless/samples' | ||
path: 'samples' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test for sofaboot samples | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
working-directory: samples/sofaboot-samples | ||
|
||
unit-test-for-dubbo-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 8 | ||
cache: maven | ||
|
||
- name: Update Maven version to 3.9.x to enable cross bundle without install | ||
env: | ||
MAVEN_VERSION: '3.9.5' | ||
run: | | ||
wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
tar xzvf apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "MAVEN_HOME=$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}" >> $GITHUB_ENV | ||
echo "$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH | ||
- name: Install Runtime | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
|
||
- name: Check code formatter | ||
run: sh ./check_format.sh | ||
|
||
- name: Checkout Samples Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'koupleless/samples' | ||
path: 'samples' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test for dubbo samples | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
working-directory: samples/dubbo-samples | ||
|
||
unit-test-for-dubbo32-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
cache: maven | ||
|
||
- name: Update Maven version to 3.9.x to enable cross bundle without install | ||
env: | ||
MAVEN_VERSION: '3.9.5' | ||
run: | | ||
wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
tar xzvf apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "MAVEN_HOME=$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}" >> $GITHUB_ENV | ||
echo "$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH | ||
- name: Install Runtime | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
|
||
- name: Check code formatter | ||
run: sh ./check_format.sh | ||
|
||
- name: Checkout Samples Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'koupleless/samples' | ||
path: 'samples' | ||
ref: runtime-2.1.x | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test for dubbo32 samples | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
working-directory: samples/dubbo32-samples | ||
|
||
unit-test-for-springboot3-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
cache: maven | ||
|
||
- name: Update Maven version to 3.9.x to enable cross bundle without install | ||
env: | ||
MAVEN_VERSION: '3.9.5' | ||
run: | | ||
wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
tar xzvf apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "MAVEN_HOME=$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}" >> $GITHUB_ENV | ||
echo "$GITHUB_WORKSPACE/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH | ||
- name: Install Runtime | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
|
||
- name: Check code formatter | ||
run: sh ./check_format.sh | ||
|
||
- name: Checkout Samples Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'koupleless/samples' | ||
path: 'samples' | ||
ref: runtime-2.0.x | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test for springboot3 samples | ||
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -am -B -U | ||
working-directory: samples/springboot3-samples |