diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index bc90819..f101ae2 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -1,10 +1,19 @@ -name: App test +name: Test application (test + coverage) on: - push: - branches: [ master ] + workflow_dispatch: pull_request: - branches: [ master ] + paths: + - 'src/**' + +permissions: + id-token: write + statuses: write + checks: write + # may also be read + contents: write + pull-requests: write + actions: write jobs: test-app: @@ -22,9 +31,6 @@ jobs: distribution: 'temurin' java-version: '17' - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Setup .NET Core # Required to execute ReportGenerator uses: actions/setup-dotnet@v3 if: success() || failure() @@ -32,6 +38,9 @@ jobs: dotnet-version: 6.x dotnet-quality: 'ga' + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Test app run: ./gradlew test @@ -70,4 +79,4 @@ jobs: ${{ github.workspace }}/build/reports/xml/jacoco min-coverage-overall: 80 min-coverage-changed-files: 80 - title: Coverage Report \ No newline at end of file + title: Coverage Report