-
Notifications
You must be signed in to change notification settings - Fork 1
134 lines (129 loc) · 4.12 KB
/
default-tests.yml
File metadata and controls
134 lines (129 loc) · 4.12 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Java CI
on: [push, pull_request]
jobs:
checkstyle:
name: Run checkstyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
java-package: jdk
- name: Run checkstyle with Gradle
run: ./gradlew clean checkstyleMain checkstyleTest
test:
name: Run basic test with Java ${{ matrix.java_version }}
runs-on: ubuntu-latest
needs: checkstyle
strategy:
matrix:
java_version: [
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21'
]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
java-package: jdk
- name: Build with Gradle
run: ./gradlew clean build
integration-test:
name: Run integration test with Java ${{ matrix.java_version }} and Gradle ${{ matrix.gradle_version }}
runs-on: ubuntu-latest
needs: test
continue-on-error: true
strategy:
fail-fast: false
matrix:
java_version: ['11']
gradle_version: [
'8.6',
'8.5',
'8.4',
'8.3',
'8.2.1',
'8.1.1',
'8.0.2',
'7.6.4',
'7.5.1',
'7.4.2',
'7.3.3',
'7.3',
'7.2',
'7.1.1',
'7.0.2',
'6.9.4',
'6.8.3',
'6.8.2',
'6.7.1',
'6.6.1',
'6.5.1',
'6.4.1',
'6.3',
'6.2.2',
'6.1.1',
'6.0.1',
'5.6.4',
'5.5.1',
'5.4.1',
'5.3.1',
'5.3',
# '5.2.1', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.2', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.1', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.0', # Doesn't support conventions: https://docs.gradle.org/5.1/release-notes.html#specify-a-convention-for-a-property
]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
java-package: jdk
- name: Install a test version with Gradle
run: ./gradlew clean publishAllPublicationsToLocalPluginRepositoryRepository
- name: Setup TEMP_DIR
run: echo "TEMP_DIR=$(mktemp -d --tmpdir=/home/runner/work/git-commit-id-gradle-plugin/git-commit-id-gradle-plugin git-commit-id-gradle-debugging.XXXXXXXXXX)" >> $GITHUB_ENV
- name: Checkout git-commit-id-gradle-debugging to run actual gradle integration tests
uses: actions/checkout@v4
with:
submodules: recursive
repository: git-commit-id/git-commit-id-gradle-debugging
path: ${{env.TEMP_DIR}}
- name: Setup Gradle ${{ matrix.gradle_version }}
run: |
cd "${{env.TEMP_DIR}}"
./gradlew wrapper --gradle-version ${{ matrix.gradle_version }} --distribution-type bin
- name: Verify Setup of Gradle ${{ matrix.gradle_version }}
run: |
cd "${{env.TEMP_DIR}}"
./gradlew -version
- name: Run the local testversion with Gradle
run: |
cd "${{env.TEMP_DIR}}"
./gradlew clean build --rerun-tasks
- name: Validate if the testversion has produced the desired output
run: /bin/bash -c '[[ -f "${{env.TEMP_DIR}}"/build/git.properties ]] && cat "${{env.TEMP_DIR}}"/build/git.properties || exit 1;'