Skip to content

Commit bf5fd94

Browse files
committed
wip3
1 parent b1f2720 commit bf5fd94

File tree

1 file changed

+1
-106
lines changed

1 file changed

+1
-106
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -2,115 +2,10 @@ name: "PR"
22
on:
33
- pull_request
44
jobs:
5-
detect-test-suite-modules:
6-
name: Detect Modules in PR
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v5
10-
with:
11-
repository: ${{ github.event.pull_request.head.repo.full_name }}
12-
ref: ${{ github.event.pull_request.head.ref }}
13-
fetch-depth: 0
14-
- id: fetch-latest-target-branch-commits # makes sure that latest target branch HEAD commit is available locally
15-
# fetching the latest 15 commits as we want to rebase the PR to target branch to ensure just changed file are parsed.
16-
# If someone have outdated branch (16+ commits) the job fail
17-
name: 'Fetch the latest 2 target (base) branch commits'
18-
run: |
19-
git remote add quarkus_qe_target_repo https://github.com/quarkus-qe/quarkus-test-suite.git
20-
git fetch quarkus_qe_target_repo ${GITHUB_BASE_REF} --depth=15
21-
git config user.email "qe@quarkus"
22-
git config user.name "Quarkus QE"
23-
git rebase quarkus_qe_target_repo/${GITHUB_BASE_REF}
24-
- id: files
25-
uses: tj-actions/changed-files@v47
26-
continue-on-error: true
27-
- id: detect-changes
28-
run: |
29-
MODULES=$(find -name pom.xml | sed -e 's|pom.xml| |' | sed -e 's|./| |' | grep -v " quarkus/" | grep -v resources)
30-
CHANGED=""
31-
MODULES_ARG=""
32-
EXCLUDE_LONG_RUNS="-DexcludedGroups=long-running"
33-
34-
# If changed file have some special character, its path is surrounded with quotes which causing the if statement fail
35-
CHANGED_FILE=$(echo ${{ steps.files.outputs.all_changed_and_modified_files }} | sed 's/\"/\\"/')
36-
37-
for module in $MODULES
38-
do
39-
# Check if files contains main pom.xml or changes github workflows as we want to run all modules here.
40-
if [[ $CHANGED_FILE =~ [^\/]pom\.xml|^pom\.xml|^\.github/ ]]; then
41-
CHANGED=""
42-
EXCLUDE_LONG_RUNS=""
43-
break
44-
fi
45-
46-
if [[ $CHANGED_FILE =~ ("$module") ]] ; then
47-
# Check if module contains tests with @Tag("long-running")
48-
for file in $(find "$module" -type f -name "*.java"); do
49-
if grep -q '@Tag("long-running")' "$file"; then
50-
EXCLUDE_LONG_RUNS=""
51-
break
52-
fi
53-
done
54-
55-
CHANGED=$(echo $CHANGED" "$module)
56-
fi
57-
done
58-
59-
# trim leading spaces so that module args don't start with comma
60-
CHANGED="$(echo $CHANGED | xargs)"
61-
62-
MODULES_ARG="${CHANGED// /,}"
63-
echo "MODULES_ARG=$MODULES_ARG" >> $GITHUB_OUTPUT
64-
echo "EXCLUDE_LONG_RUNS=$EXCLUDE_LONG_RUNS" >> $GITHUB_OUTPUT
65-
outputs:
66-
MODULES_ARG: ${{ steps.detect-changes.outputs.MODULES_ARG }}
67-
EXCLUDE_LONG_RUNS: ${{ steps.detect-changes.outputs.EXCLUDE_LONG_RUNS }}
68-
prepare-jvm-native-latest-modules-mvn-param:
69-
name: Prepare Maven Params For Linux JVM and native Build
70-
runs-on: ubuntu-latest
71-
needs: detect-test-suite-modules
72-
env:
73-
MODULES_ARG: ${{ needs.detect-test-suite-modules.outputs.MODULES_ARG }}
74-
EXCLUDE_LONG_RUNS: ${{ needs.detect-test-suite-modules.outputs.EXCLUDE_LONG_RUNS }}
75-
steps:
76-
- id: prepare-modules-mvn-param
77-
run: |
78-
if [[ -n ${MODULES_ARG} ]]; then
79-
echo "Running modules: ${MODULES_ARG}"
80-
echo "JVM_MODULES_MAVEN_PARAM=[\" -pl ${MODULES_ARG} -Dall-modules ${EXCLUDE_LONG_RUNS}\"]" >> $GITHUB_OUTPUT
81-
echo "NATIVE_MODULES_MAVEN_PARAM=[\" -pl ${MODULES_ARG} -Dall-modules ${EXCLUDE_LONG_RUNS}\"]" >> $GITHUB_OUTPUT
82-
else
83-
JVM_MODULES_GROUPS=(
84-
" -P cache-modules,spring-modules,http-modules,test-tooling-modules,messaging-modules,monitoring-modules,websockets-modules"
85-
" -P root-modules,hibernate-modules"
86-
" -P security-modules,sql-db-modules,nosql-db-modules"
87-
)
88-
89-
NATIVE_MODULES_GROUPS=(
90-
" -P root-modules,websockets-modules,test-tooling-modules,nosql-db-modules"
91-
" -P http-modules,cache-modules"
92-
" -P security-modules,spring-modules"
93-
" -P hibernate-modules"
94-
" -P sql-db-modules"
95-
" -P messaging-modules,monitoring-modules"
96-
)
97-
98-
JVM_PARAMS=$(printf "'%s ${EXCLUDE_LONG_RUNS}', " "${JVM_MODULES_GROUPS[@]}")
99-
JVM_PARAMS="[${JVM_PARAMS%, }]"
100-
echo "JVM_MODULES_MAVEN_PARAM=${JVM_PARAMS}" >> $GITHUB_OUTPUT
101-
102-
NATIVE_PARAMS=$(printf "'%s ${EXCLUDE_LONG_RUNS}', " "${NATIVE_MODULES_GROUPS[@]}")
103-
NATIVE_PARAMS="[${NATIVE_PARAMS%, }]"
104-
echo "NATIVE_MODULES_MAVEN_PARAM=${NATIVE_PARAMS}" >> $GITHUB_OUTPUT
105-
fi
106-
outputs:
107-
JVM_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.JVM_MODULES_MAVEN_PARAM }}
108-
NATIVE_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.NATIVE_MODULES_MAVEN_PARAM }}
1095
linux-build-jvm-latest:
1106
name: Linux JVM
1117
runs-on: ubuntu-latest
1128
timeout-minutes: 240
113-
needs: [prepare-jvm-native-latest-modules-mvn-param]
1149
strategy:
11510
fail-fast: false
11611
matrix:
@@ -134,7 +29,7 @@ jobs:
13429
- uses: ./.github/actions/use-docker-mirror
13530
- name: Build with Maven
13631
run: |
137-
mvn -fae -V -B --no-transfer-progress clean verify -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" ${{ matrix.module-mvn-args }} -am
32+
mvn -fae -V -B --no-transfer-progress clean verify -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" -pl http/management -am
13833
- name: Detect flaky tests
13934
id: flaky-test-detector
14035
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}

0 commit comments

Comments
 (0)