-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow to validate the
snippets
project
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Validate snippets" | ||
|
||
on: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: [ master ] | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters