Skip to content

Commit

Permalink
Use json file to define native-tests matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Nov 10, 2020
1 parent 451362d commit eff7a80
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 170 deletions.
126 changes: 126 additions & 0 deletions .github/native-tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"category": [
"Main",
"Data1",
"Data2",
"Data3",
"Data4",
"Data5",
"Data6",
"Security1",
"Security2",
"Security3",
"Amazon",
"Messaging",
"Cache",
"HTTP",
"Misc1",
"Misc2",
"Misc3",
"Misc4",
"Spring",
"gRPC"
],
"include": [
{
"category": "Main",
"timeout": 40,
"test-modules": "main"
},
{
"category": "Data1",
"timeout": 65,
"test-modules": "jpa-h2 jpa-mariadb jpa-mssql jpa-derby jpa-without-entity hibernate-tenancy"
},
{
"category": "Data2",
"timeout": 65,
"test-modules": "jpa jpa-mysql jpa-db2 reactive-mysql-client reactive-db2-client hibernate-reactive-db2 hibernate-reactive-mysql"
},
{
"category": "Data3",
"timeout": 70,
"test-modules": "flyway hibernate-orm-panache hibernate-orm-panache-kotlin hibernate-orm-envers liquibase"
},
{
"category": "Data4",
"timeout": 55,
"test-modules": "mongodb-client mongodb-panache redis-client neo4j hibernate-orm-rest-data-panache"
},
{
"category": "Data5",
"timeout": 65,
"test-modules": "jpa-postgresql narayana-stm narayana-jta reactive-pg-client hibernate-reactive-postgresql"
},
{
"category": "Data6",
"timeout": 40,
"test-modules": "elasticsearch-rest-client elasticsearch-rest-high-level-client hibernate-search-orm-elasticsearch"
},
{
"category": "Amazon",
"timeout": 45,
"test-modules": "amazon-services amazon-lambda amazon-lambda-http"
},
{
"category": "Messaging",
"timeout": 85,
"test-modules": "artemis-core artemis-jms kafka kafka-streams reactive-messaging-amqp reactive-messaging-kafka"
},
{
"category": "Security1",
"timeout": 50,
"test-modules": "elytron-security-oauth2 elytron-security elytron-security-jdbc elytron-undertow elytron-security-ldap"
},
{
"category": "Security2",
"timeout": 70,
"test-modules": "oidc oidc-code-flow oidc-tenancy keycloak-authorization oidc-wiremock"
},
{
"category": "Security3",
"timeout": 50,
"test-modules": "vault vault-app vault-agroal"
},
{
"category": "Cache",
"timeout": 55,
"test-modules": "infinispan-cache-jpa infinispan-client cache"
},
{
"category": "HTTP",
"timeout": 60,
"test-modules": "elytron-resteasy resteasy-jackson resteasy-mutiny vertx vertx-http vertx-web vertx-graphql virtual-http rest-client"
},
{
"category": "Misc1",
"timeout": 65,
"test-modules": "maven jackson jsonb jsch jgit quartz qute consul-config"
},
{
"category": "Misc2",
"timeout": 65,
"test-modules": "tika hibernate-validator test-extension logging-gelf bootstrap-config mailer"
},
{
"category": "Misc3",
"timeout": 65,
"test-modules": "kubernetes-client openshift-client"
},
{
"category": "Misc4",
"timeout": 65,
"test-modules": "smallrye-config smallrye-graphql picocli-native gradle micrometer-mp-metrics micrometer-native micrometer-prometheus smallrye-metrics logging-json jaxp"
},
{
"category": "Spring",
"timeout": 50,
"test-modules": "spring-di spring-web spring-data-jpa spring-boot-properties spring-cloud-config-client"
},
{
"category": "gRPC",
"timeout": 65,
"test-modules": "grpc-health grpc-interceptors grpc-mutual-auth grpc-plain-text grpc-plain-text-mutiny grpc-proto-v2 grpc-streaming grpc-tls"
}
]
}
184 changes: 15 additions & 169 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,183 +466,29 @@ jobs:
name: test-reports-tcks
path: 'test-reports.tgz'

read-native-tests-json:
name: Read json file with native-tests matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: read
run: |
json=$(tr -d '\n' < .github/native-tests.json )
echo $json
echo "::set-output name=matrix::${json}"
native-tests:
name: Native Tests - ${{matrix.category}}
needs: build-jdk11
needs: [build-jdk11, read-native-tests-json]
runs-on: ubuntu-latest
# Ignore the following YAML Schema error
timeout-minutes: ${{matrix.timeout}}
strategy:
max-parallel: 8
fail-fast: false
matrix:
category: [Main, Data1, Data2, Data3, Data4, Data5, Data6, Security1, Security2, Security3, Amazon, Messaging, Cache, HTTP, Misc1, Misc2, Misc3, Misc4, Spring, gRPC]
include:
- category: Main
timeout: 40
test-modules: main
- category: Data1
timeout: 65
test-modules: >
jpa-h2
jpa-mariadb
jpa-mssql
jpa-derby
jpa-without-entity
hibernate-tenancy
- category: Data2
timeout: 65
test-modules: >
jpa
jpa-mysql
jpa-db2
reactive-mysql-client
reactive-db2-client
hibernate-reactive-db2
hibernate-reactive-mysql
- category: Data3
timeout: 70
test-modules: >
flyway
hibernate-orm-panache
hibernate-orm-panache-kotlin
hibernate-orm-envers
liquibase
- category: Data4
timeout: 55
test-modules: >
mongodb-client
mongodb-panache
redis-client
neo4j
hibernate-orm-rest-data-panache
- category: Data5
timeout: 65
test-modules: >
jpa-postgresql
narayana-stm
narayana-jta
reactive-pg-client
hibernate-reactive-postgresql
- category: Data6
timeout: 40
test-modules: >
elasticsearch-rest-client
elasticsearch-rest-high-level-client
hibernate-search-orm-elasticsearch
- category: Amazon
timeout: 45
test-modules: >
amazon-services
amazon-lambda
amazon-lambda-http
- category: Messaging
timeout: 85
test-modules: >
artemis-core
artemis-jms
kafka
kafka-streams
reactive-messaging-amqp
reactive-messaging-kafka
- category: Security1
timeout: 50
test-modules: >
elytron-security-oauth2
elytron-security
elytron-security-jdbc
elytron-undertow
elytron-security-ldap
- category: Security2
timeout: 70
test-modules: >
oidc
oidc-code-flow
oidc-tenancy
keycloak-authorization
oidc-wiremock
- category: Security3
timeout: 50
test-modules: >
vault
vault-app
vault-agroal
- category: Cache
timeout: 55
test-modules: >
infinispan-cache-jpa
infinispan-client
cache
- category: HTTP
timeout: 60
test-modules: >
elytron-resteasy
resteasy-jackson
resteasy-mutiny
vertx
vertx-http
vertx-web
vertx-graphql
virtual-http
rest-client
- category: Misc1
timeout: 65
test-modules: >
maven
jackson
jsonb
jsch
jgit
quartz
qute
consul-config
- category: Misc2
timeout: 65
test-modules: >
tika
hibernate-validator
test-extension
logging-gelf
bootstrap-config
mailer
# kubernetes-client alone takes 30mn+
- category: Misc3
timeout: 65
test-modules: >
kubernetes-client
openshift-client
- category: Misc4
timeout: 65
test-modules: >
smallrye-config
smallrye-graphql
picocli-native
gradle
micrometer-mp-metrics
micrometer-native
micrometer-prometheus
smallrye-metrics
logging-json
jaxp
- category: Spring
timeout: 50
test-modules: >
spring-di
spring-web
spring-data-jpa
spring-boot-properties
spring-cloud-config-client
- category: gRPC
timeout: 65
test-modules: >
grpc-health
grpc-interceptors
grpc-mutual-auth
grpc-plain-text
grpc-plain-text-mutiny
grpc-proto-v2
grpc-streaming
grpc-tls
matrix: ${{ fromJson(needs.read-native-tests-json.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,4 @@ DevMojoIT require a few minutes to run but anything more than that is not expect
* The native integration test for my extension didn't run in the CI

In the interest of speeding up CI, the native build job `native-tests` have been split into multiple categories which are run in parallel.
This means that each new extension needs to be configured explicitly in [`ci-actions.yml`](.github/workflows/ci-actions.yml) to have its integration tests run in native mode.
This means that each new extension needs to be configured explicitly in [`native-tests.json`](.github/native-tests.json) to have its integration tests run in native mode.

0 comments on commit eff7a80

Please sign in to comment.