Skip to content

Commit

Permalink
separate lint task, update checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhee17 committed Mar 28, 2022
1 parent 5da15fe commit 1925eae
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
47 changes: 46 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew --no-daemon --stacktrace -Pcoverage checkstyle check build
run: ./gradlew --no-daemon --stacktrace -Pcoverage -PnoLint build
shell: bash

- name: Cleanup Gradle Cache
Expand Down Expand Up @@ -80,3 +80,48 @@ jobs:
if: always()
run: jps | grep -vi "jps" | awk '{ print $1 }' | xargs -I'{}' jstack -l {} || true
shell: bash

lint:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
GRADLE_OPTS: -Xmx1280m
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: [14]
steps:
- uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}

- name: Restore Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/wrapper/dists
~/.gradle/caches/jars-3
~/.gradle/caches/modules-2
~/.gradle/caches/package-lists
~/.gradle/caches/sphinx-binary
~/.gradle/go/binary
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew --no-daemon --stacktrace check
shell: bash

- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
shell: bash
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ allprojects {
}
}

// Require to use JDK 10 when releasing.
// Require to use JDK 13 when releasing.
tasks.release.doFirst {
if (JavaVersion.current() != JavaVersion.VERSION_13) {
throw new IllegalStateException("You must release using JDK 13.")
Expand Down
3 changes: 1 addition & 2 deletions dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ com.linecorp.armeria:
- https://www.javadoc.io/doc/com.linecorp.armeria/armeria-javadoc/1.14.1/

com.puppycrawl.tools:
# Requires jdk 11
checkstyle: { version: '9.2.1' }
checkstyle: { version: '10.1' }

com.spotify:
completable-futures:
Expand Down

0 comments on commit 1925eae

Please sign in to comment.