-
Notifications
You must be signed in to change notification settings - Fork 33
47 lines (45 loc) · 1.71 KB
/
maven-build-caching-samples-verification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Node.js and Npm
uses: actions/setup-node@v4
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