Initial attempt at Java support #11
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
name: Java Lint | |
on: | |
push: | |
paths: | |
- 'java/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git | |
run: git config --global user.email "[email protected]" && git config --global user.name "GitHub Actions" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: make ja_dependencies | |
- name: Run linter | |
run: make ja_lint | |
- name: Check for differences | |
run: | | |
# Get the diff from the last commit to the current working tree | |
if [ -n "$(git diff HEAD)" ]; then | |
echo "There are changes detected:" | |
git diff HEAD | |
exit 1 | |
else | |
echo "No changes detected." | |
fi |