This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 02f236e Add Dubbo-Spring-Boot build for github actions (#7135)
02f236e is described below
commit 02f236e96dc34cdd715e75c837b881a9c09c48a7
Author: Albumen Kevin <[email protected]>
AuthorDate: Wed Jan 27 23:52:55 2021 +0800
Add Dubbo-Spring-Boot build for github actions (#7135)
* Add Dubbo-Spring-Boot build for github actions
* Add dubbo-spring-boot git branch env
* Add workflow_dispatch support
---
.github/workflows/build-and-test.yml | 50 +++++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build-and-test.yml
b/.github/workflows/build-and-test.yml
index 508c5df..fde2928 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -1,6 +1,6 @@
name: Build and Test
-on: [push, pull_request]
+on: [push, pull_request, workflow_dispatch]
env:
FORK_COUNT: 2
@@ -13,6 +13,8 @@ env:
spring-boot.version:1.5.22.RELEASE;
spring-boot.version:2.4.1;
'
+ DUBBO_SPRING_BOOT_REF: '2.7.x'
+
jobs:
build-source:
runs-on: ubuntu-18.04
@@ -44,6 +46,47 @@ jobs:
name: dubbo-version
path: dubbo-version
+ build-dubbo-spring-boot:
+ runs-on: ubuntu-latest
+ outputs:
+ commit_id: ${{ steps.git-checker.outputs.commit_id }}
+ cache-hit: ${{ steps.dubbocache.outputs.cache-hit }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ repository: 'apache/dubbo-spring-boot-project'
+ ref: ${{env.DUBBO_SPRING_BOOT_REF}}
+ - name: "Get commit id"
+ id: git-checker
+ run: |
+ #compare dubbo commit id
+ last_commit_id=`git log --format="%H" -n 1`
+ echo "::set-output name=commit_id::$last_commit_id"
+ echo "commit_id: $last_commit_id"
+ - name: "Dubbo-spring-boot cache"
+ id: dubbocache
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository/org/apache/dubbo
+ key: ${{ runner.os
}}-dubbo-spring-boot-snapshot-${{steps.git-checker.outputs.commit_id}}
+ - name: "Cache local Maven repository"
+ if: steps.dubbocache.outputs.cache-hit != 'true'
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os
}}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-${{
hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os
}}-dubbo-spring-boot-${{env.DUBBO_SPRING_BOOT_REF}}-maven-
+ - name: "Set up JDK 8"
+ if: steps.dubbocache.outputs.cache-hit != 'true'
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: "Build dubbo spring boot"
+ if: steps.dubbocache.outputs.cache-hit != 'true'
+ run: |
+ ./mvnw --batch-mode --no-transfer-progress clean install
-Dmaven.test.skip=true -Dmaven.test.skip.exec=true
+
unit-test:
needs: [build-source]
name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})"
@@ -128,6 +171,11 @@ jobs:
key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
restore-keys: |
${{ runner.os }}-dubbo-
+ - name: "Restore Dubbo-spring-boot cache"
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository/org/apache/dubbo
+ key: ${{ runner.os
}}-dubbo-spring-boot-snapshot-${{needs.build-dubbo-spring-boot.outputs.commit_id}}
- name: "Download test list"
uses: actions/download-artifact@v2
with: