Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Change CI JDK version to 17 #200

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions .github/workflows/pull-request-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,60 @@ name: Test and Lint
on: [pull_request]

jobs:
test:
build:
name: Build with JDK ${{ matrix.java-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
java-version: [11, 17]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: 'gradle'

- name: Build
run: ./gradlew build

- name: Unit Test
run: ./gradlew testDebugUnitTest

- name: Lint
run: ./gradlew ktlintCheck

- name: Upload build results
if: always()
uses: actions/upload-artifact@v4
with:
# artifacts name
name: build-results
name: build-results-${{ matrix.java-version }}
# copy reports of all packages
path: '**/build/reports/**'
# artifact will expire in 7 days.
retention-days: 7

test-and-lint:
name: Test and Lint with JDK 17
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Unit Test
run: ./gradlew testDebugUnitTest

- name: Lint
run: ./gradlew ktlintCheck

- name: Upload test and lint results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-and-lint-results
path: '**/build/reports/**'
retention-days: 7
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Tue Jun 11 16:11:46 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists