You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by rz...@apache.org on 2026/10/08 09:44:55 UTC

(opennlp) 01/01: GH-1393: Cache the downloaded test models between CI runs

This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch fix/ci-cache-models
in repository https://gitbox.apache.org/repos/asf/opennlp.git

commit 3fc41b870c238f3fe88ef349e62e6a2e8bf6949b
Author: Kristian Rickert <kr...@apache.org>
AuthorDate: Sun Oct 4 05:02:21 2026 -0400

    GH-1393: Cache the downloaded test models between CI runs
---
 .github/workflows/maven.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 9b816c10c..288174f42 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -73,13 +73,19 @@ jobs:
         key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
         restore-keys: |
           ${{ runner.os }}-maven-
+    # Test models are downloaded once and reused, so the build does not depend on the
+    # model host on every run. Change the key when the tests move to other models.
+    - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+      with:
+        path: ~/.opennlp-ci
+        key: ${{ runner.os }}-opennlp-models-ud-1.3
     - name: Set up JDK ${{ matrix.java }}
       uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
       with:
         distribution: temurin
         java-version: ${{ matrix.java }}
     - name: Build with Maven
-      run: mvn -V clean test verify --show-version --batch-mode --no-transfer-progress -Pjacoco -Pci
+      run: mvn -V clean test verify --show-version --batch-mode --no-transfer-progress -Pjacoco -Pci "-Dopennlp.download.home=$HOME/.opennlp-ci"
     - name: Jacoco
       run: mvn jacoco:report
     # The binary distribution is pure-Java and platform-independent, so we build it