diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 3a09934..6f88111 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -9,7 +9,9 @@ name: Gradle Package on: push: + branches: [""] + release: types: [created] workflow_dispatch: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6acf010..0bcdff2 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -11,7 +11,7 @@ on: push: branches: [ "main" , "DEV"] pull_request: - branches: [ "main" ] + branches: [ "main" , "DEV"] workflow_dispatch: jobs: @@ -31,19 +31,41 @@ jobs: run: ./gradlew build --scan - name: Store reports - if: failure() - uses: actions/upload-artifact@v3 + +# if: failure() + uses: actions/upload-pages-artifact@v3.0.1 #actions/upload-artifact@v4 with: - name: reports - path: | - **/build/reports/ - **/build/test-results/ + path: build/reports/tests/test +# **/build/test-results/ + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: Package path: build/libs + +# Deploy job + deploy: + needs: gradle + runs-on: ubuntu-latest + permissions: + id-token: write # Required for OIDC token generation + contents: write # Required to deploy to GitHub Pages + pages: write + steps: + - name: Download reports artifact + uses: actions/download-artifact@v4 + with: + name: github-pages # Match the artifact name used in upload-artifact + path: build/reports/tests/test + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + #build-dir: build/reports/tests/test + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. diff --git a/build.gradle b/build.gradle index 1e03af5..c28e544 100644 --- a/build.gradle +++ b/build.gradle @@ -21,3 +21,13 @@ dependencies { testImplementation 'junit:junit:4.12' } +test { + // testLogging.showStandardStreams = true + //testLogging.exceptionFormat = 'full' + testLogging { + showStandardStreams = true + events = ["passed", "failed", "skipped"] + exceptionFormat = 'full' + } +} +