From 3a84ffca3420c5720aad6c9487013d9d20867aea Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Tue, 9 Jan 2024 03:43:42 +0800 Subject: [PATCH] ci: generate build scans and dependency graphs --- .github/workflows/build.yml | 5 ++++- .github/workflows/submit-dependency-graph.yml | 16 ++++++++++++++++ settings.gradle.kts | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/submit-dependency-graph.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36e68e9..5ed6674 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,10 +32,13 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-version: ${{ matrix.gradle }} + dependency-graph: generate + artifact-retention-days: 1 - name: Build - run: ./gradlew -s build + run: gradle -s build --scan - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: always() with: report_paths: '**/build/test-results/*/TEST-*.xml' + check_name: "JUnit Test Report (Gradle ${{ matrix.gradle }}, Java ${{ matrix.java }})" diff --git a/.github/workflows/submit-dependency-graph.yml b/.github/workflows/submit-dependency-graph.yml new file mode 100644 index 0000000..9d8c20b --- /dev/null +++ b/.github/workflows/submit-dependency-graph.yml @@ -0,0 +1,16 @@ +name: Submit Dependency Graph + +on: + workflow_run: + workflows: [Build] + types: [completed] + +jobs: + submit-dependency-graph: + name: Submit Dependency Graph + runs-on: ubuntu-latest + steps: + - name: Retrieve dependency graph artifact and submit + uses: gradle/gradle-build-action@v2 + with: + dependency-graph: download-and-submit \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 162272f..a605101 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,13 @@ plugins { + id("com.gradle.enterprise") version "3.16.1" id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" } rootProject.name = "cursed-publish" +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} \ No newline at end of file