Skip to content

Commit 7b66821

Browse files
authored
Merge pull request #556 from TheSnoozer/fix-tests-java16
Fix tests for java16+add java17-ea to the test matrix and update dependencies
2 parents 4a1ac8f + 70c6b01 commit 7b66821

File tree

2 files changed

+57
-21
lines changed

2 files changed

+57
-21
lines changed

.github/workflows/default-tests.yml

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ jobs:
77
name: Run checkstyle
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v1
10+
- uses: actions/checkout@v2
1111
- name: Set up JDK 8
12-
uses: actions/setup-java@v1
12+
uses: actions/setup-java@v2
1313
with:
14+
distribution: 'zulu'
1415
java-version: 8
16+
java-package: jdk
1517
- name: Cache local Maven repository
16-
uses: actions/cache@v1
18+
uses: actions/cache@v2
1719
with:
1820
path: ~/.m2
1921
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
@@ -27,22 +29,34 @@ jobs:
2729
needs: checkstyle
2830
strategy:
2931
matrix:
30-
java_version: ['8', '9', '10', '11', '12', '13', '14', '15', '16']
32+
java_allow_illegal_access: [false]
33+
java_version: ['8', '9', '10', '11', '12', '13', '14', '15']
34+
include:
35+
- java_version: '16'
36+
java_allow_illegal_access: true
37+
- java_version: '17-ea'
38+
java_allow_illegal_access: true
3139

3240
steps:
33-
- uses: actions/checkout@v1
41+
- uses: actions/checkout@v2
3442
- name: Set up JDK ${{ matrix.java_version }}
35-
uses: actions/setup-java@v1
43+
uses: actions/setup-java@v2
3644
with:
45+
distribution: 'zulu'
3746
java-version: ${{ matrix.java_version }}
47+
java-package: jdk
3848
- name: Cache local Maven repository
39-
uses: actions/cache@v1
49+
uses: actions/cache@v2
4050
with:
4151
path: ~/.m2
4252
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4353
restore-keys: ${{ runner.os }}-m2
44-
- name: Build with Maven
54+
- name: Build with Maven (no illegal access allowed)
55+
if: ${{ ! matrix.java_allow_illegal_access }}
4556
run: mvn clean verify javadoc:javadoc -B
57+
- name: Build with Maven (illegal access allowed)
58+
if: ${{ matrix.java_allow_illegal_access }}
59+
run: mvn clean verify javadoc:javadoc -Pjava-allow-illegal-access -B
4660

4761
integration-test:
4862
name: Run integration test with Java ${{ matrix.java_version }} and Maven ${{ matrix.maven_version }}
@@ -51,14 +65,16 @@ jobs:
5165
strategy:
5266
matrix:
5367
java_version: ['8']
54-
maven_version: ['3.0', '3.0.5', '3.1.1', '3.2.5', '3.3.9', '3.5.4', '3.6.3']
68+
maven_version: ['3.0', '3.0.5', '3.1.1', '3.2.5', '3.3.9', '3.5.4', '3.6.3', '3.8.1']
5569

5670
steps:
57-
- uses: actions/checkout@v1
71+
- uses: actions/checkout@v2
5872
- name: Set up JDK ${{ matrix.java_version }}
59-
uses: actions/setup-java@v1
73+
uses: actions/setup-java@v2
6074
with:
75+
distribution: 'zulu'
6176
java-version: ${{ matrix.java_version }}
77+
java-package: jdk
6278
- name: Setup Maven ${{ matrix.maven_version }}
6379
run: /bin/bash -c 'if [[ -n "${{ matrix.maven_version }}" ]]; then \
6480
echo "Downloading Maven ${{ matrix.maven_version }}....";
@@ -77,7 +93,7 @@ jobs:
7793
- name: Setup System Path to use the custom Maven
7894
run: echo "${M2_HOME}/bin" >> $GITHUB_PATH
7995
- name: Cache local Maven repository
80-
uses: actions/cache@v1
96+
uses: actions/cache@v2
8197
with:
8298
path: ~/.m2
8399
# Include Maven version in key to not use cache from other Maven versions
@@ -101,14 +117,16 @@ jobs:
101117
if: ${{ github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') }}
102118

103119
steps:
104-
- uses: actions/checkout@v1
120+
- uses: actions/checkout@v2
105121
- run: git checkout "${GITHUB_REF:11}"
106122
- name: Set up JDK 8
107-
uses: actions/setup-java@v1
123+
uses: actions/setup-java@v2
108124
with:
125+
distribution: 'zulu'
109126
java-version: 8
127+
java-package: jdk
110128
- name: Cache local Maven repository
111-
uses: actions/cache@v1
129+
uses: actions/cache@v2
112130
with:
113131
path: ~/.m2
114132
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
@@ -123,13 +141,15 @@ jobs:
123141
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') && github.ref == 'refs/heads/master' }}
124142

125143
steps:
126-
- uses: actions/checkout@v1
144+
- uses: actions/checkout@v2
127145
- name: Set up JDK 8
128-
uses: actions/setup-java@v1
146+
uses: actions/setup-java@v2
129147
with:
148+
distribution: 'zulu'
130149
java-version: 8
150+
java-package: jdk
131151
- name: Cache local Maven repository
132-
uses: actions/cache@v1
152+
uses: actions/cache@v2
133153
with:
134154
path: ~/.m2
135155
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

maven/pom.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
<maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
3434

3535
<junit.version>4.13.2</junit.version>
36-
<mockito.version>3.1.0</mockito.version>
36+
<mockito.version>3.11.0</mockito.version>
3737

38-
<assertj.version>3.14.0</assertj.version>
38+
<assertj.version>3.19.0</assertj.version>
3939
</properties>
4040

4141
<dependencies>
@@ -101,7 +101,7 @@
101101
<dependency>
102102
<groupId>commons-io</groupId>
103103
<artifactId>commons-io</artifactId>
104-
<version>2.8.0</version>
104+
<version>2.9.0</version>
105105
<type>jar</type>
106106
<scope>test</scope>
107107
</dependency>
@@ -195,6 +195,22 @@
195195
</build>
196196

197197
<profiles>
198+
<profile>
199+
<id>java-allow-illegal-access</id>
200+
<build>
201+
<plugins>
202+
<plugin>
203+
<groupId>org.apache.maven.plugins</groupId>
204+
<artifactId>maven-surefire-plugin</artifactId>
205+
<configuration>
206+
<trimStackTrace>false</trimStackTrace>
207+
<!-- Workaround for https://github.com/stefanbirkner/system-lambda/issues/23 -->
208+
<argLine>--illegal-access=permit</argLine>
209+
</configuration>
210+
</plugin>
211+
</plugins>
212+
</build>
213+
</profile>
198214
<profile>
199215
<id>gpg</id>
200216
<build>

0 commit comments

Comments
 (0)