Skip to content

Commit 7aee2ac

Browse files
committed
improve testing
1 parent 32967d5 commit 7aee2ac

File tree

7 files changed

+122
-19
lines changed

7 files changed

+122
-19
lines changed

.github/workflows/json-smart-formatting.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
push:
55
branches:
66
- master
7+
- upgrade
78
pull_request:
89
branches:
910
- master
1011

12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
formatting:
1317
runs-on: ubuntu-latest
@@ -21,6 +25,14 @@ jobs:
2125
distribution: 'temurin'
2226
cache: 'maven'
2327

28+
- name: Cache local Maven repository
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.m2/repository
32+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: |
34+
${{ runner.os }}-maven-
35+
2436
- name: Check formatting accessors-smart
2537
run: cd accessors-smart; ./mvnw spotless:check
2638

.github/workflows/json-smart-unit-tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@ on:
55
branches:
66
- master
77
- update2024
8+
- upgrade
89
pull_request:
910
branches:
1011
- master
1112

13+
permissions:
14+
contents: read
15+
1216
jobs:
1317
publish:
1418
runs-on: ubuntu-latest
1519
strategy:
1620
matrix:
17-
java-version: [8, 11, 16, 17, 21]
21+
java-version: [8, 11, 17, 21, 22, 23]
1822
steps:
1923
- uses: actions/checkout@v4
2024

@@ -25,6 +29,14 @@ jobs:
2529
distribution: 'temurin'
2630
cache: 'maven'
2731

32+
- name: Cache local Maven repository
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.m2/repository
36+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
37+
restore-keys: |
38+
${{ runner.os }}-maven-
39+
2840
- name: Unit tests accessors-smart
2941
run: cd accessors-smart; ./mvnw -B install; ./mvnw -B clean test
3042

.github/workflows/security.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Security Scanning
2+
3+
on:
4+
push:
5+
branches: [ master, upgrade ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '0 6 * * 1' # Weekly on Monday at 6am UTC
10+
11+
permissions:
12+
contents: read
13+
security-events: write
14+
actions: read
15+
16+
jobs:
17+
codeql:
18+
name: CodeQL Analysis
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'java' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up JDK 11
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: 11
33+
distribution: 'temurin'
34+
cache: 'maven'
35+
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@v3
38+
with:
39+
languages: ${{ matrix.language }}
40+
41+
- name: Build project
42+
run: |
43+
cd accessors-smart && ./mvnw clean compile
44+
cd ../json-smart && ./mvnw clean compile
45+
cd ../json-smart-action && ./mvnw clean compile
46+
47+
- name: Perform CodeQL Analysis
48+
uses: github/codeql-action/analyze@v3
49+
50+
dependency-check:
51+
name: Dependency Vulnerability Scan
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Set up JDK 11
59+
uses: actions/setup-java@v4
60+
with:
61+
java-version: 11
62+
distribution: 'temurin'
63+
cache: 'maven'
64+
65+
- name: Run OWASP Dependency Check
66+
run: |
67+
cd accessors-smart && ./mvnw org.owasp:dependency-check-maven:check
68+
cd ../json-smart && ./mvnw org.owasp:dependency-check-maven:check
69+
cd ../json-smart-action && ./mvnw org.owasp:dependency-check-maven:check
70+
continue-on-error: true
71+
72+
- name: Upload dependency check results
73+
uses: actions/upload-artifact@v4
74+
if: always()
75+
with:
76+
name: dependency-check-reports
77+
path: '**/target/dependency-check-report.html'

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# json-smart-v2
2-
[![Build Status](https://travis-ci.org/netplex/json-smart-v2.svg?branch=master)](https://travis-ci.org/netplex/json-smart-v2)
2+
[![CI](https://github.com/netplex/json-smart-v2/actions/workflows/json-smart-unit-tests.yml/badge.svg)](https://github.com/netplex/json-smart-v2/actions/workflows/json-smart-unit-tests.yml)
3+
[![Security](https://github.com/netplex/json-smart-v2/actions/workflows/security.yml/badge.svg)](https://github.com/netplex/json-smart-v2/actions/workflows/security.yml)
34
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.minidev/json-smart/badge.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/net.minidev/json-smart/)
45
[![Coverage Status](https://coveralls.io/repos/github/netplex/json-smart-v2/badge.svg?branch=master)](https://coveralls.io/github/netplex/json-smart-v2?branch=master)
6+
[![Java 8+](https://img.shields.io/badge/Java-8%2B-blue.svg)](https://openjdk.java.net/)
57

68

79
Json-smart development started in 2010, when SQL servers did not support native JSON fields, NoSQL databases were slowly emerging, and all the existing JSON APIs were bogus. I wrote lots of tests to benchmark and compare JSON java parsers.

accessors-smart/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ limitations under the License.
9292
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
9393
<groupId>org.apache.maven.plugins</groupId>
9494
<artifactId>maven-gpg-plugin</artifactId>
95-
<version>3.2.7</version>
95+
<version>3.2.8</version>
9696
<executions>
9797
<execution>
9898
<id>sign-artifacts</id>
@@ -178,7 +178,7 @@ limitations under the License.
178178
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
179179
<groupId>org.apache.maven.plugins</groupId>
180180
<artifactId>maven-compiler-plugin</artifactId>
181-
<version>3.13.0</version>
181+
<version>3.15.1</version>
182182
<configuration>
183183
<encoding>UTF-8</encoding>
184184
<source>${maven.compiler.source}</source>
@@ -189,7 +189,7 @@ limitations under the License.
189189
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
190190
<groupId>org.apache.maven.plugins</groupId>
191191
<artifactId>maven-resources-plugin</artifactId>
192-
<version>3.3.1</version>
192+
<version>3.4.0</version>
193193
<configuration>
194194
<encoding>UTF-8</encoding>
195195
</configuration>
@@ -198,13 +198,13 @@ limitations under the License.
198198
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
199199
<groupId>org.apache.maven.plugins</groupId>
200200
<artifactId>maven-jar-plugin</artifactId>
201-
<version>3.4.2</version>
201+
<version>3.5.1</version>
202202
</plugin>
203203
<plugin>
204204
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
205205
<groupId>org.apache.maven.plugins</groupId>
206206
<artifactId>maven-javadoc-plugin</artifactId>
207-
<version>3.10.1</version>
207+
<version>3.11.2</version>
208208
<!-- ONLY NEEDED With jdk 1.7+ -->
209209
<configuration>
210210
<source>8</source>
@@ -243,7 +243,7 @@ limitations under the License.
243243
<plugin>
244244
<groupId>com.diffplug.spotless</groupId>
245245
<artifactId>spotless-maven-plugin</artifactId>
246-
<version>2.44.2</version>
246+
<version>2.47.0</version>
247247
<configuration>
248248
<java>
249249
<includes>
@@ -266,7 +266,7 @@ limitations under the License.
266266
<dependency>
267267
<groupId>org.junit.jupiter</groupId>
268268
<artifactId>junit-jupiter-api</artifactId>
269-
<version>5.11.2</version>
269+
<version>5.13.4</version>
270270
<scope>test</scope>
271271
</dependency>
272272
<!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->

json-smart-action/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
170170
<groupId>org.apache.maven.plugins</groupId>
171171
<artifactId>maven-compiler-plugin</artifactId>
172-
<version>3.14.0</version>
172+
<version>3.15.1</version>
173173
<configuration>
174174
<encoding>UTF-8</encoding>
175175
<source>${maven.compiler.source}</source>
@@ -180,7 +180,7 @@
180180
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
181181
<groupId>org.apache.maven.plugins</groupId>
182182
<artifactId>maven-resources-plugin</artifactId>
183-
<version>3.3.1</version>
183+
<version>3.4.0</version>
184184
<configuration>
185185
<encoding>UTF-8</encoding>
186186
</configuration>
@@ -189,7 +189,7 @@
189189
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
190190
<groupId>org.apache.maven.plugins</groupId>
191191
<artifactId>maven-jar-plugin</artifactId>
192-
<version>3.4.2</version>
192+
<version>3.5.1</version>
193193
</plugin>
194194
<plugin>
195195
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
@@ -214,7 +214,7 @@
214214
<plugin>
215215
<groupId>org.apache.felix</groupId>
216216
<artifactId>maven-bundle-plugin</artifactId>
217-
<version>5.1.9</version>
217+
<version>5.1.10</version>
218218
<extensions>true</extensions>
219219
<configuration>
220220
<instructions>
@@ -233,7 +233,7 @@
233233
<plugin>
234234
<groupId>com.diffplug.spotless</groupId>
235235
<artifactId>spotless-maven-plugin</artifactId>
236-
<version>2.46.1</version>
236+
<version>2.47.0</version>
237237
<configuration>
238238
<java>
239239
<includes>

json-smart/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ limitations under the License.
185185
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
186186
<groupId>org.apache.maven.plugins</groupId>
187187
<artifactId>maven-compiler-plugin</artifactId>
188-
<version>3.14.0</version>
188+
<version>3.15.1</version>
189189
<configuration>
190190
<encoding>UTF-8</encoding>
191191
<source>${maven.compiler.source}</source>
@@ -196,7 +196,7 @@ limitations under the License.
196196
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
197197
<groupId>org.apache.maven.plugins</groupId>
198198
<artifactId>maven-resources-plugin</artifactId>
199-
<version>3.3.1</version>
199+
<version>3.4.0</version>
200200
<configuration>
201201
<encoding>UTF-8</encoding>
202202
</configuration>
@@ -205,7 +205,7 @@ limitations under the License.
205205
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
206206
<groupId>org.apache.maven.plugins</groupId>
207207
<artifactId>maven-jar-plugin</artifactId>
208-
<version>3.4.2</version>
208+
<version>3.5.1</version>
209209
</plugin>
210210
<plugin>
211211
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
@@ -231,7 +231,7 @@ limitations under the License.
231231
<!-- https://mvnrepository.com/artifact/org.apache.felix/maven-bundle-plugin -->
232232
<groupId>org.apache.felix</groupId>
233233
<artifactId>maven-bundle-plugin</artifactId>
234-
<version>5.1.9</version>
234+
<version>5.1.10</version>
235235
<extensions>true</extensions>
236236
<configuration>
237237
<instructions>
@@ -254,7 +254,7 @@ limitations under the License.
254254
<plugin>
255255
<groupId>com.diffplug.spotless</groupId>
256256
<artifactId>spotless-maven-plugin</artifactId>
257-
<version>2.46.1</version>
257+
<version>2.47.0</version>
258258
<configuration>
259259
<java>
260260
<includes>

0 commit comments

Comments
 (0)