Skip to content

Commit 4efe71e

Browse files
author
William Fiset
committed
2 parents a864e53 + fa281a4 commit 4efe71e

File tree

3 files changed

+48
-37
lines changed

3 files changed

+48
-37
lines changed

.github/workflows/code-formatting.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/gradle.yml

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,39 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
permissions:
13+
checks: write
14+
1215
jobs:
13-
build:
16+
test:
17+
name: Test
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up JDK 1.8
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: 8
26+
distribution: 'temurin'
27+
cache: 'gradle'
28+
- name: Validate Gradle Wrapper
29+
uses: gradle/wrapper-validation-action@v1
30+
- name: Setup and execute tests via Gradle
31+
uses: gradle/gradle-build-action@v2
32+
with:
33+
gradle-version: wrapper
34+
arguments: test
35+
- name: Publish Test Results
36+
if: ${{ always() }}
37+
uses: mikepenz/action-junit-report@v3
38+
with:
39+
report_paths: "**/TEST-*.xml"
40+
exclude_sources: build/
41+
annotate_only: ${{ github.event_name == 'pull_request' }}
1442

43+
style-check:
44+
name: Code Formatting Check
1545
runs-on: ubuntu-latest
1646

1747
steps:
@@ -22,7 +52,19 @@ jobs:
2252
java-version: 8
2353
distribution: 'temurin'
2454
cache: 'gradle'
25-
- name: Grant execute permission for gradlew
26-
run: chmod +x gradlew
27-
- name: Run all tests
28-
run: ./gradlew test
55+
- name: Validate Gradle Wrapper
56+
uses: gradle/wrapper-validation-action@v1
57+
# The google formatter is broken atm. Disabling for now.
58+
- name: Verify all Java files are formatted correctly according to the Google Java Style Guide using Gradle
59+
uses: gradle/gradle-build-action@v2
60+
if: ${{ false }}
61+
id: verifygooglejavaformat
62+
with:
63+
gradle-version: wrapper
64+
arguments: verifyGoogleJavaFormat
65+
- name: Create summary if format check failed
66+
if: ${{ false }}
67+
# Enable this when Google Java formatter is enabled
68+
# if: ${{ steps.verifygooglejavaformat.outcome == 'failure' }}
69+
run: |
70+
echo "Run the command `./gradlew goJF` to fix Java formatting." >> $GITHUB_STEP_SUMMARY

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Sun Aug 14 11:49:58 CEST 2022
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
33
distributionBase=GRADLE_USER_HOME
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)