diff --git a/action.yml b/action.yml
index 0969d5d..50968a5 100644
--- a/action.yml
+++ b/action.yml
@@ -84,3 +84,25 @@ runs:
   using: 'node20'
   main: 'dist/setup/index.js'
   post: 'dist/cleanup/index.js'
+  name: 'Build and Test Java Project'
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+
+    - name: Set up JDK 11
+      uses: actions/setup-java@v2
+      with:
+        java-version: '11'
+        distribution: 'adopt'
+        
+    - name: Build with Gradle
+      run: ./gradlew build
+
+    - name: Run tests
+      run: ./gradlew test