Update readme and actions
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:
@@ -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
|
||||
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user