2023-06-29 09:50:35 -06:00
|
|
|
name: Demo Job Summary, for Gradle builds
|
2022-05-27 20:03:47 -06:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
|
|
|
|
env:
|
|
|
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
|
|
|
|
|
|
|
jobs:
|
2024-01-01 12:31:36 -07:00
|
|
|
many-gradle-builds:
|
2022-05-27 20:03:47 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2023-09-04 22:34:02 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-05-27 20:03:47 -06:00
|
|
|
- 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
|
2023-07-22 08:49:39 -06:00
|
|
|
- name: Build kotlin-dsl project without Build Scan®
|
2022-06-04 22:37:36 -06:00
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
2022-06-19 09:56:40 -06:00
|
|
|
run: ./gradlew assemble check --no-scan
|
2023-07-22 08:49:39 -06:00
|
|
|
- name: Build kotlin-dsl project with Build Scan® publish failure
|
2022-06-19 09:16:27 -06:00
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
|
|
run: ./gradlew check -Dgradle.enterprise.url=https://not.valid.server
|
2022-05-27 20:03:47 -06:00
|
|
|
- name: Build groovy-dsl project
|
|
|
|
working-directory: .github/workflow-samples/groovy-dsl
|
|
|
|
run: ./gradlew assemble
|
2022-06-04 22:53:36 -06:00
|
|
|
- name: Build kotlin-dsl project with multiple gradle invocations
|
2022-05-27 20:03:47 -06:00
|
|
|
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
|
2023-08-19 12:37:50 -06:00
|
|
|
|
2024-01-01 12:31:36 -07:00
|
|
|
successful-builds-with-no-summary:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build distribution
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
add-job-summary: on-failure
|
|
|
|
- name: Build kotlin-dsl project
|
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
|
|
run: ./gradlew assemble
|
|
|
|
- name: Build kotlin-dsl project without Build Scan®
|
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
|
|
run: ./gradlew assemble check --no-scan
|
|
|
|
|
2023-08-19 12:37:50 -06:00
|
|
|
pre-existing-gradle-home:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2023-09-04 22:34:02 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-19 12:37:50 -06:00
|
|
|
- name: Build distribution
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
- name: Pre-create Gradle User Home
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir ~/.gradle
|
|
|
|
mkdir ~/.gradle/caches
|
|
|
|
touch ~/.gradle/caches/dummy.txt
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: ./
|
|
|
|
- name: Run build
|
|
|
|
working-directory: .github/workflow-samples/groovy-dsl
|
|
|
|
run: ./gradlew assemble
|