This is an automated email from the ASF dual-hosted git repository. rzo1 pushed a commit to branch OPENNLP-1688 in repository https://gitbox.apache.org/repos/asf/opennlp.git
The following commit(s) were added to refs/heads/OPENNLP-1688 by this push: new c02ca852 x c02ca852 is described below commit c02ca852c20fbc57b5c50cd7cd6aaa11de9ec8d4 Author: Richard Zowalla <r...@apache.org> AuthorDate: Fri Jan 17 13:16:45 2025 +0100 x --- .github/workflows/shell-tests.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/shell-tests.yml b/.github/workflows/shell-tests.yml index ddcfdb72..94867f54 100644 --- a/.github/workflows/shell-tests.yml +++ b/.github/workflows/shell-tests.yml @@ -147,39 +147,38 @@ jobs: - name: Build with Maven run: mvn -V clean install --no-transfer-progress -Pci -DskipTests=true - - name: Find and Extract OpenNLP Distribution - run: | - name: Find and Extract OpenNLP Distribution run: | # Find the first non-src .tar.gz file in the target directory $TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1 - + # Ensure we found a file if (-not $TAR_FILE) { Write-Error "Error: No matching tar.gz file found in opennlp-distr/target" exit 1 } - - # Extract the tar.gz file to the user profile directory - $Destination = "$env:USERPROFILE" + + # Extract the tar.gz file to the current directory + $Destination = "$(pwd)" tar -xzf $TAR_FILE.FullName -C $Destination - + # Get the directory name of the extracted content (excluding the tar path) $EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0] - + # Set OPENNLP_HOME dynamically in the environment - $OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR" + $OPENNLP_HOME_PATH = "$Destination\$EXTRACTED_DIR" Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging - + # Set the environment variable for future steps echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH + - name: Verify Extraction run: | - # Print the OPENNLP_HOME and check if the 'bin' directory exists - echo "OPENNLP_HOME: $env:OPENNLP_HOME" - dir "$env:OPENNLP_HOME\bin" + # Print the OPENNLP_HOME and check if the 'bin' directory exists + echo "OPENNLP_HOME: $env:OPENNLP_HOME" + dir "$env:OPENNLP_HOME\bin" - name: Run Pester Tests run: |