From 7e85212f597cff2f06749857d683a10b659681a2 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Fri, 27 May 2022 20:03:47 -0600 Subject: [PATCH] Add workflow with several Gradle builds to demo job summary --- .../groovy-dsl/settings.gradle | 14 ++++++- .github/workflows/demo-job-summary.yml | 37 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/demo-job-summary.yml diff --git a/.github/workflow-samples/groovy-dsl/settings.gradle b/.github/workflow-samples/groovy-dsl/settings.gradle index 9461d56..18e6441 100644 --- a/.github/workflow-samples/groovy-dsl/settings.gradle +++ b/.github/workflow-samples/groovy-dsl/settings.gradle @@ -1 +1,13 @@ -rootProject.name = 'basic' +plugins { + id "com.gradle.enterprise" version "3.10.1" +} + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + publishAlways() + uploadInBackground = false + } +} +rootProject.name = 'groovy-dsl' diff --git a/.github/workflows/demo-job-summary.yml b/.github/workflows/demo-job-summary.yml new file mode 100644 index 0000000..2c4a062 --- /dev/null +++ b/.github/workflows/demo-job-summary.yml @@ -0,0 +1,37 @@ +name: Demo Job Summary for Gradle builds + +on: + workflow_dispatch: + push: + +env: + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true + +jobs: + run-gradle-builds: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Build distribution + shell: bash + run: | + npm install + npm run build + - name: Setup Gradle + uses: ./ + - name: Build kotlin-dsl project + working-directory: .github/workflow-samples/kotlin-dsl + run: ./gradlew assemble + - name: Build groovy-dsl project + working-directory: .github/workflow-samples/groovy-dsl + run: ./gradlew assemble + - name: Build kotlin-dsl project again + working-directory: .github/workflow-samples/kotlin-dsl + run: | + ./gradlew tasks --no-daemon + ./gradlew help check + - name: Fail groovy-dsl project + working-directory: .github/workflow-samples/groovy-dsl + continue-on-error: true + run: ./gradlew not-a-real-task