Skip to content

Commit f5546bf

Browse files
committed
Java: Invoke software tests using ngr
1 parent accdfbb commit f5546bf

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

.github/workflows/test-java-jdbc.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Java JDBC
22
on:
33

44
pull_request:
5-
branches: [ main ]
5+
branches: ~
66
paths:
77
- '.github/workflows/test-java-jdbc.yml'
88
- 'by-language/java-jdbc/**'
9+
- 'testing/ngr.py'
910
push:
1011
branches: [ main ]
1112
paths:
1213
- '.github/workflows/test-java-jdbc.yml'
1314
- 'by-language/java-jdbc/**'
15+
- 'testing/ngr.py'
1416

1517
# Allow job to be triggered manually.
1618
workflow_dispatch:
@@ -49,9 +51,6 @@ jobs:
4951
java-version: "11"
5052
cache: "maven"
5153

52-
- name: Run software tests
54+
- name: Validate by-language/java-jdbc
5355
run: |
54-
cd by-language/java-jdbc
55-
mvn install
56-
mvn exec:java -Dexec.args="--dburl 'jdbc:postgresql://localhost:5432/'"
57-
mvn exec:java -Dexec.args="--dburl 'jdbc:crate://localhost:5432/'"
56+
python testing/ngr.py by-language/java-jdbc

.github/workflows/test-java-jooq.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Java jOOQ
22
on:
33

44
pull_request:
5-
branches: [ main ]
5+
branches: ~
66
paths:
77
- '.github/workflows/test-java-jooq.yml'
88
- 'by-language/java-jooq/**'
9+
- 'testing/ngr.py'
910
push:
1011
branches: [ main ]
1112
paths:
1213
- '.github/workflows/test-java-jooq.yml'
1314
- 'by-language/java-jooq/**'
15+
- 'testing/ngr.py'
1416

1517
# Allow job to be triggered manually.
1618
workflow_dispatch:
@@ -49,7 +51,6 @@ jobs:
4951
java-version: "17"
5052
cache: "gradle"
5153

52-
- name: Run software tests
54+
- name: Validate by-language/java-jooq
5355
run: |
54-
cd by-language/java-jooq
55-
./gradlew check
56+
python testing/ngr.py by-language/java-jooq

.github/workflows/testcontainers-java.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Testcontainers for Java
22
on:
33

44
pull_request:
5-
branches: [ main ]
5+
branches: ~
66
paths:
77
- '.github/workflows/testcontainers-java.yml'
88
- 'testing/testcontainers/java/**'
9+
- 'testing/ngr.py'
910
push:
1011
branches: [ main ]
1112
paths:
1213
- '.github/workflows/testcontainers-java.yml'
1314
- 'testing/testcontainers/java/**'
15+
- 'testing/ngr.py'
1416

1517
# Allow job to be triggered manually.
1618
workflow_dispatch:
@@ -41,7 +43,6 @@ jobs:
4143
java-version: "17"
4244
cache: "gradle"
4345

44-
- name: Run software tests
46+
- name: Validate testing/testcontainers/java
4547
run: |
46-
cd testing/testcontainers/java
47-
./gradlew check
48+
python testing/ngr.py testing/testcontainers/java

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,17 @@ Examples::
4141

4242
python testing/ngr.py by-language/csharp-npgsql
4343
python testing/ngr.py by-language/csharp-npgsql --npgsql-version=6.0.9
44+
python testing/ngr.py by-language/java-jdbc
45+
python testing/ngr.py by-language/java-jooq
4446
python testing/ngr.py by-language/php-amphp
4547
python testing/ngr.py by-language/php-pdo
4648
python testing/ngr.py by-language/python-sqlalchemy
4749
python testing/ngr.py by-language/ruby
4850

51+
More examples::
52+
53+
python testing/ngr.py testing/testcontainers/java
54+
4955
It is recommended to invoke ``ngr`` from within a Python virtualenv.
5056

5157
.. _CrateDB: https://github.com/crate/crate

by-language/java-jdbc/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test:
2+
mvn exec:java -Dexec.args="--dburl 'jdbc:postgresql://localhost:5432/'"
3+
mvn exec:java -Dexec.args="--dburl 'jdbc:crate://localhost:5432/'"

0 commit comments

Comments
 (0)