3131 DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3232
3333jobs :
34- Simple :
34+ # Ubuntu runs all ITs in a single job (already fast at ~39 min)
35+ Ubuntu :
36+ runs-on : ubuntu-latest
37+
38+ steps :
39+ - uses : actions/checkout@v5
40+ - name : Set up JDK
41+ uses : actions/setup-java@v5
42+ with :
43+ distribution : corretto
44+ java-version : 17
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ - name : Cache Maven packages
48+ uses : actions/cache@v5
49+ with :
50+ path : ~/.m2
51+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
52+ restore-keys : ${{ runner.os }}-m2-
53+ - name : Adjust Linux kernel somaxconn
54+ shell : bash
55+ run : sudo sysctl -w net.core.somaxconn=65535
56+ - name : IT/UT Test
57+ shell : bash
58+ run : |
59+ mvn clean verify \
60+ -P with-integration-tests \
61+ -DskipUTs \
62+ -DintegrationTest.forkCount=2 -DDataNodeMaxHeapSize=1024 \
63+ -pl integration-test \
64+ -am -PTableSimpleIT
65+ - name : Upload Artifact
66+ if : failure()
67+ uses : actions/upload-artifact@v6
68+ with :
69+ name : table-standalone-log-Linux
70+ path : integration-test/target/cluster-logs
71+ retention-days : 1
72+
73+ # Windows is ~67% slower than Ubuntu, so split into 3 shards to parallelize
74+ Windows :
3575 strategy :
3676 fail-fast : false
37- max-parallel : 15
3877 matrix :
39- os : [ubuntu-latest, windows-latest ]
40- runs-on : ${{ matrix.os }}
78+ shard : [0, 1, 2 ]
79+ runs-on : windows-latest
4180
4281 steps :
4382 - uses : actions/checkout@v5
@@ -55,36 +94,47 @@ jobs:
5594 key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5695 restore-keys : ${{ runner.os }}-m2-
5796 - name : Adjust network dynamic TCP ports range
58- if : ${{ runner.os == 'Windows' }}
5997 shell : pwsh
6098 run : |
6199 netsh int ipv4 set dynamicport tcp start=32768 num=32768
62100 netsh int ipv4 set dynamicport udp start=32768 num=32768
63101 netsh int ipv6 set dynamicport tcp start=32768 num=32768
64102 netsh int ipv6 set dynamicport udp start=32768 num=32768
65- - name : Adjust Linux kernel somaxconn
66- if : ${{ runner.os == 'Linux' }}
103+ - name : Build IT shard list
67104 shell : bash
68- run : sudo sysctl -w net.core.somaxconn=65535
69- # - name: Adjust Mac kernel somaxconn
70- # if: ${{ runner.os == 'macOS' }}
71- # shell: bash
72- # run: sudo sysctl -w kern.ipc.somaxconn=65535
105+ # Distribute TableLocalStandaloneIT test classes across 3 shards using hash-mod assignment.
106+ # The list is written to a file so failsafe.includesFile can read it without command-line length limits.
107+ run : |
108+ set -euo pipefail
109+ SHARD=${{ matrix.shard }}
110+ TOTAL=3
111+ # Write outside the repo so Apache RAT (license check) doesn't flag the file.
112+ # Using a single grep -rl call instead of `find | xargs grep`: on Windows Git Bash,
113+ # ARG_MAX is small so xargs batches the file list, and any batch with no matches
114+ # makes grep exit 1, which makes xargs exit 123 and trips `set -o pipefail`.
115+ grep -rl --include='*IT.java' 'TableLocalStandaloneIT' integration-test/src/test/java \
116+ | awk -F'/' '{print $NF}' | sed 's/\.java$//' \
117+ | sort \
118+ | awk -v s=$SHARD -v t=$TOTAL 'NR%t==s' \
119+ > "$RUNNER_TEMP/it-shard.txt"
120+ echo "Shard $SHARD/$TOTAL contains $(wc -l < "$RUNNER_TEMP/it-shard.txt") test classes"
121+ head -5 "$RUNNER_TEMP/it-shard.txt"
73122 - name : IT/UT Test
74123 shell : bash
75- # we do not compile client-cpp for saving time, it is tested in client.yml
76- # we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
77124 run : |
78125 mvn clean verify \
79126 -P with-integration-tests \
80127 -DskipUTs \
81128 -DintegrationTest.forkCount=2 -DDataNodeMaxHeapSize=1024 \
129+ -Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
130+ -DfailIfNoTests=false \
131+ -Dfailsafe.failIfNoSpecifiedTests=false \
82132 -pl integration-test \
83133 -am -PTableSimpleIT
84134 - name : Upload Artifact
85135 if : failure()
86136 uses : actions/upload-artifact@v6
87137 with :
88- name : table-standalone-log-java ${{ matrix.java }}-${{ runner.os }}
138+ name : table-standalone-log-Windows-shard ${{ matrix.shard }}
89139 path : integration-test/target/cluster-logs
90140 retention-days : 1
0 commit comments