From e31d62dc7601152720942da2dc1d5ed35c0f142d Mon Sep 17 00:00:00 2001 From: ayaxan7 Date: Thu, 16 Jan 2025 01:54:29 +0530 Subject: [PATCH] Introduced pull request checks --- .github/workflows/pull_request.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..2338472 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,25 @@ +name: Run test + +on: + pull_request: + branches: [master] # Trigger the workflow on pull requests to the master branch + +jobs: + build: + runs-on: ubuntu-latest # Use the latest Ubuntu runner + + steps: + - uses: actions/checkout@v4 # Check out the code from the repository + + - name: Set up JDK 1.8 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' # Use Temurin distribution for JDK + java-version: 1.8 # Specify Java version 1.8 + cache: gradle # Cache Gradle dependencies + + - name: Grant execute permission for gradlew + run: chmod +x gradlew # Make the gradlew script executable + + - name: Run unit tests + run: ./gradlew test # Run unit tests using Gradle \ No newline at end of file