-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (42 loc) · 1.28 KB
/
plugin_build.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
48
49
50
51
52
53
name: Build Gradle Plugin
on: [pull_request]
jobs:
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
test:
name: Test Gradle Plugin
needs: gradleValidation
runs-on: ubuntu-latest
steps:
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
# Cache Gradle dependencies
- name: Setup Cache
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Validate build
run: ./gradlew Plugin:assemble Plugin:assembleLocal
# Run ktlint
- name: Run KtLint
run: ./gradlew Plugin:ktlint
# Run test Gradle task
- name: Run JVM Tests
run: ./gradlew Plugin:test