mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 20:15:46 -06:00
Run unit tests with JDK matrix (#43240)
Closes #16039 Signed-off-by: stianst <stianst@gmail.com>
This commit is contained in:
9
.github/scripts/find-modules-with-unit-tests.sh
vendored
Executable file
9
.github/scripts/find-modules-with-unit-tests.sh
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
find . -path '**/src/test/java' -type d \
|
||||
| grep -v -E '\./(docs|distribution|misc|operator|tests|testsuite|test-framework|quarkus)/' \
|
||||
| sed 's|/src/test/java||' \
|
||||
| sed 's|./||' \
|
||||
| sort \
|
||||
| tr '\n' ',' \
|
||||
| sed 's/,$//'
|
||||
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -114,14 +114,7 @@ jobs:
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
SEP=""
|
||||
PROJECTS=""
|
||||
for i in `find -name '*Test.java' -type f | egrep -v './(operator|testsuite|quarkus|docs|tests|test-framework)/' | sed 's|/src/test/java/.*||' | sort | uniq | sed 's|./||'`; do
|
||||
PROJECTS="$PROJECTS$SEP$i"
|
||||
SEP=","
|
||||
done
|
||||
|
||||
./mvnw test -pl "$PROJECTS" -am
|
||||
./mvnw test -am -pl "$(.github/scripts/find-modules-with-unit-tests.sh)"
|
||||
|
||||
base-integration-tests:
|
||||
name: Base IT
|
||||
@@ -292,7 +285,7 @@ jobs:
|
||||
./mvnw test -pl quarkus/tests/integration ${PARAMS["${{ matrix.suite }}"]} 2>&1 | misc/log/trimmer.sh
|
||||
|
||||
jdk-integration-tests:
|
||||
name: Java Distribution IT
|
||||
name: Java Distribution IT/UT
|
||||
needs: build
|
||||
timeout-minutes: 100
|
||||
strategy:
|
||||
@@ -332,6 +325,10 @@ jobs:
|
||||
run:
|
||||
./mvnw install -e -DskipTests -DskipExamples -DskipProtoLock=true
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
./mvnw test -pl "$(.github/scripts/find-modules-with-unit-tests.sh)"
|
||||
|
||||
- uses: ./.github/actions/upload-flaky-tests
|
||||
name: Upload flaky tests
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user