Skip to content

Commit 4588dbb

Browse files
authored
Update gradle.yml
1 parent 7ccdbd3 commit 4588dbb

File tree

1 file changed

+26
-29
lines changed

1 file changed

+26
-29
lines changed

.github/workflows/gradle.yml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7-
8-
name: Java CI with Gradle
1+
name: Java CI with Gradle for Spring Boot (Liberica JDK)
92

103
on:
114
push:
@@ -21,31 +14,36 @@ jobs:
2114
contents: read
2215

2316
steps:
24-
- uses: actions/checkout@v4
25-
- name: Set up JDK 23
17+
- name: Check out the repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Liberica JDK 23
2621
uses: actions/setup-java@v4
2722
with:
2823
java-version: '23'
29-
distribution: 'temurin'
24+
distribution: 'liberica'
3025

31-
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
32-
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
33-
- name: Setup Gradle
26+
- name: Set up Gradle
3427
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
3528

29+
# Кэшируем зависимости Gradle для ускорения сборок
30+
- name: Cache Gradle dependencies
31+
uses: actions/cache@v2
32+
with:
33+
path: ~/.gradle/caches
34+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
35+
restore-keys: |
36+
${{ runner.os }}-gradle-
37+
3638
- name: Build with Gradle Wrapper
37-
run: ./gradlew build
39+
run: ./gradlew build --no-daemon
40+
41+
- name: Run tests with Gradle
42+
run: ./gradlew test --no-daemon
3843

39-
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
40-
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
41-
#
42-
# - name: Setup Gradle
43-
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
44-
# with:
45-
# gradle-version: '8.9'
46-
#
47-
# - name: Build with Gradle 8.9
48-
# run: gradle build
44+
# Собираем Spring Boot приложение в jar (или war) файл
45+
- name: Build Spring Boot JAR
46+
run: ./gradlew bootJar --no-daemon
4947

5048
dependency-submission:
5149

@@ -55,13 +53,12 @@ jobs:
5553

5654
steps:
5755
- uses: actions/checkout@v4
58-
- name: Set up JDK 23
56+
- name: Set up Liberica JDK 23
5957
uses: actions/setup-java@v4
6058
with:
6159
java-version: '23'
62-
distribution: 'temurin'
60+
distribution: 'liberica'
6361

64-
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
65-
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
62+
# Генерируем и отправляем граф зависимостей для включения Dependabot Alerts
6663
- name: Generate and submit dependency graph
6764
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

0 commit comments

Comments
 (0)