Allow build scans to run on affected-paths runs with Gradle. #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
outputs: | |
affected-paths: ${{ steps.generate.outputs.projects }} | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
# https://github.com/gradle/gradle-build-action/issues/561 | |
- name: Create Gradle files | |
run: | | |
cd ~ | |
mkdir -p .gradle/ && touch .gradle/gradle.properties | |
- name: Set up Java | |
id: setup-java | |
uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup Gradle Java installations paths | |
run: | | |
cd ~/.gradle | |
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties | |
- name: Setup gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build and test tooling | |
run: ./gradlew --no-daemon --profile --stacktrace -PRELEASE_SIGNING_ENABLED=false -p tooling publishToMavenLocal build test | |
- name: Build and test affected-paths | |
run: ./gradlew --no-daemon --profile --stacktrace -PRELEASE_SIGNING_ENABLED=false -p affected-paths publishToMavenLocal build test | |
env: | |
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true |