File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed
Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change 2222 pull_request :
2323
2424jobs :
25- test-unix-shell :
25+ test-unix-shell-ubuntu :
2626 runs-on : ubuntu-latest
2727
2828 steps :
7676 env :
7777 JAVA_HOME : ${{ env.JAVA_HOME }}
7878 OPENNLP_HOME : ${{ env.OPENNLP_HOME }}
79+
80+ test-unix-shell-macos :
81+ name : Test on macOS
82+ runs-on : macos-latest
83+
84+ steps :
85+ - name : Checkout code
86+ uses : actions/checkout@v4
87+
88+ - name : Install Bats (Testing Framework)
89+ run : |
90+ brew update
91+ brew install bats-core
92+
93+ - name : Set up JDK 17
94+ uses : actions/setup-java@v4
95+ with :
96+ distribution : temurin
97+ java-version : 17
98+
99+ - name : Build with Maven
100+ run : mvn -V clean install --no-transfer-progress -Pci -DskipTests=true
101+
102+ - name : Find and Extract OpenNLP Distribution
103+ run : |
104+ TAR_FILE=$(find opennlp-distr/target -maxdepth 1 -type f -name "*.tar.gz" ! -name "*-src*.tar.gz" | head -n 1)
105+ if [ -z "$TAR_FILE" ]; then
106+ echo "Error: No matching tar.gz file found in opennlp-distr/target"
107+ exit 1
108+ fi
109+ tar -xzf "$TAR_FILE" -C $HOME
110+ EXTRACTED_DIR=$(tar -tf "$TAR_FILE" | head -n 1 | cut -f1 -d"/")
111+ echo "OPENNLP_HOME=$HOME/$EXTRACTED_DIR" >> $GITHUB_ENV
112+ echo "$HOME/$EXTRACTED_DIR/bin" >> $GITHUB_PATH
113+
114+ - name : Verify Extraction
115+ run : |
116+ echo "OPENNLP_HOME: $OPENNLP_HOME"
117+ ls -l $OPENNLP_HOME/bin
118+
119+ - name : Run Bats Tests
120+ run : |
121+ bats ./opennlp-distr/src/test/sh
122+ env :
123+ JAVA_HOME : ${{ env.JAVA_HOME }}
124+ OPENNLP_HOME : ${{ env.OPENNLP_HOME }}
You can’t perform that action at this time.
0 commit comments