From 80e6b894e91b8f60ef81eb59939bd331ffbe17ce Mon Sep 17 00:00:00 2001 From: Ayush Sarodey <72145248+ayushsarode@users.noreply.github.com> Date: Fri, 6 Oct 2023 18:55:04 +0530 Subject: [PATCH 1/3] Create build.yml --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0174469 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build and Test + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-lates + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up Java + uses: actions/setup-java@v2 + with: + java-version: '17' + + - name: Build and Verify + run: | + ./mvnw clean verify + working-directory: ./3scale-cms + From a434a832e8dd64b895910894dee480a9011b49a7 Mon Sep 17 00:00:00 2001 From: Ayush Sarodey <72145248+ayushsarode@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:39:14 +0530 Subject: [PATCH 2/3] Update and rename build.yml to pull-request-tests.yml --- .../{build.yml => pull-request-tests.yml} | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) rename .github/workflows/{build.yml => pull-request-tests.yml} (50%) diff --git a/.github/workflows/build.yml b/.github/workflows/pull-request-tests.yml similarity index 50% rename from .github/workflows/build.yml rename to .github/workflows/pull-request-tests.yml index 0174469..5eefbe0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/pull-request-tests.yml @@ -1,25 +1,31 @@ -name: Build and Test +name: Run Tests on Pull Requests on: pull_request: + types: + - opened + - edited + - reopened + - synchronize + - ready_for_review + - unlocked branches: - main jobs: build: - runs-on: ubuntu-lates + runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '17' - name: Build and Verify run: | ./mvnw clean verify - working-directory: ./3scale-cms From 4e7843e74e424ce7aaab7c28df931cf137c18fe6 Mon Sep 17 00:00:00 2001 From: Ayush Sarodey <72145248+ayushsarode@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:56:36 +0530 Subject: [PATCH 3/3] Update pull-request-tests.yml --- .github/workflows/pull-request-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request-tests.yml b/.github/workflows/pull-request-tests.yml index 5eefbe0..64a0b47 100644 --- a/.github/workflows/pull-request-tests.yml +++ b/.github/workflows/pull-request-tests.yml @@ -24,6 +24,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: '17' + distribution: 'temurin' - name: Build and Verify run: |