Skip to content

Combined PRs (#913) #2130

Combined PRs (#913)

Combined PRs (#913) #2130

name: Verify Maven Build Caching Samples
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
verification:
name: Verification
runs-on: ubuntu-latest
steps:
- uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Node.js and Npm
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Set up Yarn
run: npm install -g yarn
- name: Verify cacheable goals are retrieved from the build cache
id: build
working-directory: gradle-enterprise-maven-build-validation
run: |
set -o pipefail
./02-validate-local-build-caching-different-locations.sh \
-r "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" \
-c "$GITHUB_SHA" \
-p "build-caching-maven-samples" \
-g "verify" \
-a "-Dorg.slf4j.simpleLogger.log.gradle.goal.cache=debug -B" \
-s "https://ge.solutions-team.gradle.com" \
-f 2>&1 | tee -a /tmp/build.log
echo "hasUnknownParams=$(grep "Build caching was not enabled for this goal execution because the following parameters were not handled" /tmp/build.log | wc -l)" >> $GITHUB_OUTPUT
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
- name: Verify no unmapped mojo parameters
if: (success() || failure()) && steps.build.outputs.hasUnknownParams != '0'
run: exit 1