-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (38 loc) · 1.29 KB
/
gradle_validation.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
name: Gradle Wrapper Validation Example
# Will trigger on single in this repository for example purposes
# But generally this would go in your push/commit pipelines
on:
push:
branches:
- "feature/gradle-wrapper-validation-example"
tags:
- '*'
jobs:
gradle_wrapper_validation:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
command: .github/workflows/validate_gradle.sh
- os: macos-latest
command: .github/workflows/validate_gradle.sh
- os: windows-latest
command: sh .github/workflows/validate_gradle.sh
steps:
- uses: actions/checkout@v4
# Validate Gradle Wrapper (via GitHub Actions)
- uses: gradle/wrapper-validation-action@v2
# Validate Gradle Wrapper (via our own script)
# If we don't use GitHub Actions (e.g. we are using Jenkins or TeamCity etc.),
# we might still use our own script to validate that the wrapper is valid
- name: Validate Gradle Wrapper
run: ${{ matrix.command }}
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Lint & Unit Test
run: ./gradlew clean lint test