mirror of
https://github.com/gradle/actions
synced 2024-11-24 02:12:12 +00:00
cc54166e15
Fixes #35
87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
name: Demo Job Summary, for Gradle builds
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
|
|
jobs:
|
|
many-gradle-builds:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Build distribution
|
|
shell: bash
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
working-directory: sources
|
|
- name: Setup Gradle
|
|
uses: ./setup-gradle
|
|
- 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
|
|
- name: Build kotlin-dsl project with Build Scan® publish failure
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
run: ./gradlew check -Dgradle.enterprise.url=https://not.valid.server
|
|
- name: Build groovy-dsl project
|
|
working-directory: .github/workflow-samples/groovy-dsl
|
|
run: ./gradlew assemble
|
|
- name: Build kotlin-dsl project with multiple gradle invocations
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
run: |
|
|
./gradlew tasks --no-daemon
|
|
./gradlew help check
|
|
./gradlew wrapper --gradle-version 8.7 --gradle-distribution-sha256-sum 544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
|
|
- name: Fail groovy-dsl project
|
|
working-directory: .github/workflow-samples/groovy-dsl
|
|
continue-on-error: true
|
|
run: ./gradlew not-a-real-task
|
|
|
|
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
|
|
working-directory: sources
|
|
- name: Setup Gradle
|
|
uses: ./setup-gradle
|
|
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
|
|
|
|
pre-existing-gradle-home:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Build distribution
|
|
shell: bash
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
working-directory: sources
|
|
- name: Pre-create Gradle User Home
|
|
shell: bash
|
|
run: |
|
|
mkdir ~/.gradle
|
|
mkdir ~/.gradle/caches
|
|
touch ~/.gradle/caches/dummy.txt
|
|
- name: Setup Gradle
|
|
uses: ./setup-gradle
|
|
- name: Run build
|
|
working-directory: .github/workflow-samples/groovy-dsl
|
|
run: ./gradlew assemble
|