diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..97657ae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 14 + uses: actions/setup-java@v3 + with: + java-version: '14.0.2' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build and Test + run: ./gradlew build