diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000000000000000000000000000000000000..b4598458531c50e9f7dc3c9e2854abb2b85c1922 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Scala CI with Gradle + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Code Style check + run: ./gradlew spotlessCheck diff --git a/README.md b/README.md index 4a022b0af711769418adda378f61b4c249d6b5e1..4f64c32e8ce4b8fc904369425a0144df3eef1f5b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Scala CI with Gradle](https://github.com/jxnu-liguobin/Sim/actions/workflows/gradle.yml/badge.svg)](https://github.com/jxnu-liguobin/Sim/actions/workflows/gradle.yml) ### 技术栈 - 开发语言:Scala