forked from robolectric/robolectric.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1018 Bytes
/
validate-snippets.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
name: "Validate snippets"
on:
pull_request:
paths:
- "snippets/**"
push:
branches: [ master ]
paths:
- "snippets/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate_snippets:
name: "Validate snippets"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
snippets
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Check codestyle
uses: axel-op/googlejavaformat-action@v3
with:
args: "--replace"
files: snippets/**/*.java
skip-commit: true
- name: Print codestyle issues
run: git --no-pager diff --exit-code
- name: Build
run: |
cd snippets
./gradlew check