You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sz...@apache.org on 2021/03/12 01:45:06 UTC
[ratis] branch master updated: RATIS-1313. Use matrix build for
unit tests to reduce CI time (#422)
This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new f0942d0 RATIS-1313. Use matrix build for unit tests to reduce CI time (#422)
f0942d0 is described below
commit f0942d0ace4f717cf7732c1f0916b777c4f5a244
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Fri Mar 12 02:44:18 2021 +0100
RATIS-1313. Use matrix build for unit tests to reduce CI time (#422)
---
.github/workflows/post-commit.yml | 14 ++++++++---
dev-support/checks/unit.sh | 2 +-
pom.xml | 52 +++++++++++++++++++++++++++++++++++++++
3 files changed, 63 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml
index 86745f4..0e5f553 100644
--- a/.github/workflows/post-commit.yml
+++ b/.github/workflows/post-commit.yml
@@ -80,6 +80,12 @@ jobs:
unit:
name: unit
runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ profile:
+ - grpc
+ - server
+ - misc
steps:
- uses: actions/checkout@master
- name: Cache for maven dependencies
@@ -90,14 +96,14 @@ jobs:
restore-keys: |
maven-repo-${{ hashFiles('**/pom.xml') }}
maven-repo-
- - run: ./dev-support/checks/unit.sh
+ - run: ./dev-support/checks/unit.sh -P${{ matrix.profile }}-tests
- name: Summary of failures
run: cat target/${{ github.job }}/summary.txt
- if: always()
+ if: ${{ !cancelled() }}
- uses: actions/upload-artifact@master
- if: always()
+ if: ${{ !cancelled() }}
with:
- name: unit
+ name: unit-${{ matrix.profile }}
path: target/unit
- name: Delete temporary build artifacts
run: rm -rf ~/.m2/repository/org/apache/ratis
diff --git a/dev-support/checks/unit.sh b/dev-support/checks/unit.sh
index b51fc88..4a57d82 100755
--- a/dev-support/checks/unit.sh
+++ b/dev-support/checks/unit.sh
@@ -26,7 +26,7 @@ export MAVEN_OPTS="-Xmx4096m"
mvn -B -fae test "$@" | tee "${REPORT_DIR}/output.log"
rc=$?
-# shellcheck source=hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
+# shellcheck source=dev-support/checks/_mvn_unit_report.sh
source "$DIR/_mvn_unit_report.sh"
if [[ -s "$REPORT_DIR/summary.txt" ]] ; then
diff --git a/pom.xml b/pom.xml
index 68122c4..76d37c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1083,5 +1083,57 @@
</plugins>
</build>
</profile>
+
+ <profile>
+ <id>grpc-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org.apache.ratis.grpc.**</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>server-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org.apache.ratis.datastream.**</include>
+ <include>org.apache.ratis.server.**</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>misc-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org.apache.ratis.datastream.**</exclude>
+ <exclude>org.apache.ratis.grpc.**</exclude>
+ <exclude>org.apache.ratis.server.**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>