-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 1.99 KB
/
test.yml
File metadata and controls
80 lines (70 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# CI workflow for java-sdk (Gradle, JDK 25).
#
# Action pinning policy:
# - First-party actions (actions/*) are pinned to a major tag.
# - Third-party actions are pinned to a full commit SHA with a version
# comment alongside.
name: test
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
- '.editorconfig'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
- '.editorconfig'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
test:
name: test (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# build.gradle.kts pins toolchain + options.release to JDK 25.
# JDK 25 is the September 2025 LTS, so floor and latest LTS coincide.
java: ['25']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: gradle
- name: Validate Gradle wrapper
# gradle/actions/wrapper-validation v4.4.4
uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96
- name: Resolve dependencies
run: ./gradlew --no-daemon dependencies
- name: Build
run: ./gradlew --no-daemon assemble
- name: Test
run: ./gradlew --no-daemon test
- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-reports-jdk${{ matrix.java }}
path: |
**/build/reports/tests/
**/build/test-results/
if-no-files-found: ignore
retention-days: 7