Update readme and actions
All checks were successful
Java Google Checkstyle / Checkstyle Linter (push) Successful in 35s
Build with gradle / Build-with-gradle (push) Successful in 1m31s

Project now builds and runs unit tests, as well as linting with checkstyle.

Co-authored-by: Josh Chester <numbers@softwaresmyth.com>
Co-committed-by: Josh Chester <numbers@softwaresmyth.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-01-24 13:05:12 -06:00
committed by numbers
parent 38f6a8439f
commit 2f5dfa5a26
6 changed files with 574 additions and 17 deletions

View File

@@ -1,6 +1,10 @@
name: Build with cached gradle
name: Build with gradle
run-name: Building for ${{ gitea.actor }}
on: [pull_request]
on:
pull_request:
push:
branches:
- 'main'
jobs:
Build-with-gradle:
@@ -15,4 +19,5 @@ jobs:
# cache-dependency-path: | # optional
# sub-project/*.gradle*
# sub-project/**/gradle-wrapper.properties
- run: ./gradlew build --no-daemon
- run: ./gradlew test --no-daemon
- run: ./gradlew publishAllPublicationsToGiteaRepository -PgradleKey=${{ secrets.GRADLE_KEY }} --no-daemon

View File

@@ -1,10 +1,15 @@
name: Java Google Checkstyle
run-name: Linting for ${{ gitea.actor }}
permissions:
contents: read
pull-request: write
on: [pull_request]
on:
pull_request:
push:
branches:
- 'main'
jobs:
checkstyle:
@@ -16,16 +21,6 @@ jobs:
REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.REVIEWDOG_TOKEN }}
GITEA_ADDRESS: http://gitea:3000
steps:
- name: 'Pull code'
uses: actions/checkout@v6
- name: 'Find changed Java files'
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**.java
- name: 'Setup Java JDK'
uses: actions/setup-java@v4
with:
@@ -36,7 +31,16 @@ jobs:
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
# reviewdog_version: ${{ env.REVIEWDOG_VERSION }}
- name: 'Pull code'
uses: actions/checkout@v6
- name: 'Find changed Java files'
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**.java
- name: 'Run Checkstyle with Reviewdog'
if: steps.changed-files.outputs.any_changed == 'true'
@@ -46,7 +50,7 @@ jobs:
echo "Changed files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
java -jar checkstyle-${{ env.CHECKSTYLE_VERSION }}-all.jar -c google_checks.xml -f xml ${{ steps.changed-files.outputs.all_changed_files }} \
java -jar checkstyle-${{ env.CHECKSTYLE_VERSION }}-all.jar -c ./style_guide.xml -f xml ${{ steps.changed-files.outputs.all_changed_files }} \
| reviewdog -f=checkstyle \
-name="Checkstyle" \
-reporter="gitea-pr-review" \