From b626dcfa76dd8e80e20f5dfa8fff2b68933f89bd Mon Sep 17 00:00:00 2001 From: Neha Puraswani <84067016+neha-smartsense@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:05:35 +0530 Subject: [PATCH 1/4] Create app-test.yml --- .github/workflows/app-test.yml | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/app-test.yml diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml new file mode 100644 index 0000000..6e2a47d --- /dev/null +++ b/.github/workflows/app-test.yml @@ -0,0 +1,52 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/**' + +permissions: + id-token: write + statuses: write + checks: write + # may also be read + contents: write + pull-requests: write + actions: write + +jobs: + test-app: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Setup .NET Core # Required to execute ReportGenerator + uses: actions/setup-dotnet@v3 + if: success() || failure() + with: + dotnet-version: 6.x + dotnet-quality: 'ga' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Test app + run: ./gradlew test From 6c8bed4df7a1f2ed9cb4f1d530866a49e9a1bd9d Mon Sep 17 00:00:00 2001 From: Neha Puraswani <84067016+neha-smartsense@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:13:24 +0530 Subject: [PATCH 2/4] Update app-test.yml --- .github/workflows/app-test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index 6e2a47d..fcaa5e3 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -45,8 +45,5 @@ jobs: dotnet-version: 6.x dotnet-quality: 'ga' - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - name: Test app - run: ./gradlew test + run: gradle test From d769b54d0d33a7bf1cc3344e3c360231ff6009dc Mon Sep 17 00:00:00 2001 From: Neha Puraswani <84067016+neha-smartsense@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:46:42 +0530 Subject: [PATCH 3/4] Update app-test.yml --- .github/workflows/app-test.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index fcaa5e3..eac0d4d 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -38,12 +38,5 @@ jobs: distribution: 'temurin' java-version: '17' - - name: Setup .NET Core # Required to execute ReportGenerator - uses: actions/setup-dotnet@v3 - if: success() || failure() - with: - dotnet-version: 6.x - dotnet-quality: 'ga' - - name: Test app - run: gradle test + run: gradle test --scan From 327d7c3237675d3c6b9e0e4bebd62d557bc411d9 Mon Sep 17 00:00:00 2001 From: Neha Puraswani <84067016+neha-smartsense@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:46:46 +0530 Subject: [PATCH 4/4] Update app-test.yml --- .github/workflows/app-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index eac0d4d..c5de0fc 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -8,10 +8,10 @@ name: Java CI with Gradle on: - workflow_dispatch: + push: + branches: [ master ] pull_request: - paths: - - 'src/**' + branches: [ master ] permissions: id-token: write