From 6078db61572c7f2bf8affb538f95d14f1a78465b Mon Sep 17 00:00:00 2001 From: amithkoujalgi Date: Sat, 30 Aug 2025 20:04:42 +0530 Subject: [PATCH] Update GitHub Actions workflows for PRs and tests Enables all pull request event types in build-on-pull-request.yml and cleans up formatting. Removes redundant step for copying workflow file in run-tests.yml to streamline the workflow. --- .github/workflows/build-on-pull-request.yml | 13 +++++++------ .github/workflows/run-tests.yml | 11 ----------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 662c687..cca3391 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -2,11 +2,12 @@ name: Run Tests on: pull_request: - # types: [opened, reopened, synchronize, edited] - branches: [ "main" ] + types: [opened, reopened, synchronize, edited] + branches: + - main paths: - - 'src/**' # Run if changes occur in the 'src' folder - - 'pom.xml' # Run if changes occur in the 'pom.xml' file + - 'src/**' + - 'pom.xml' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -26,8 +27,8 @@ jobs: with: java-version: '11' distribution: 'adopt-hotspot' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + server-id: github + settings-path: ${{ github.workspace }} - name: Build with Maven run: mvn --file pom.xml -U clean package diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a2666c7..ca73d01 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,17 +21,6 @@ jobs: with: ref: ${{ github.event.inputs.branch }} - - name: Use workflow from checked out branch - run: | - if [ -f .github/workflows/run-tests.yml ]; then - echo "Using workflow from checked out branch." - cp .github/workflows/run-tests.yml /tmp/run-tests.yml - exit 0 - else - echo "Workflow file not found in checked out branch." - exit 1 - fi - - name: Set up Ollama run: | curl -fsSL https://ollama.com/install.sh | sh