This commit is contained in:
@@ -16,12 +16,28 @@ jobs:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java JDK
|
||||
- name: Set up Java JDK (Temurin 17)
|
||||
uses: actions/setup-java@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Ensure Java JDK Available
|
||||
run: |
|
||||
if ! command -v javac >/dev/null 2>&1; then
|
||||
echo "javac not found in PATH, installing OpenJDK..."
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update && apt-get install -y openjdk-17-jdk-headless
|
||||
elif command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache openjdk17
|
||||
fi
|
||||
fi
|
||||
echo "Using Java compiler:"
|
||||
javac -version || which javac
|
||||
echo "Using Java runtime:"
|
||||
java -version || which java
|
||||
|
||||
- name: Make scripts executable
|
||||
run: |
|
||||
chmod +x ./build_all.sh ./gradlew ./run.sh
|
||||
@@ -31,24 +47,26 @@ jobs:
|
||||
if command -v gradle >/dev/null 2>&1; then
|
||||
gradle test --info
|
||||
else
|
||||
echo "Running shell test / build verification..."
|
||||
./build_all.sh
|
||||
echo "Testing via build_all.sh..."
|
||||
sh ./build_all.sh
|
||||
fi
|
||||
|
||||
- name: Build Standalone JAR
|
||||
run: |
|
||||
./build_all.sh
|
||||
sh ./build_all.sh
|
||||
|
||||
- name: Upload j3270 Executable JAR Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: j3270-executable-jar
|
||||
path: build/j3270.jar
|
||||
if-no-files-found: error
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Upload Test Reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: test-reports
|
||||
path: |
|
||||
@@ -60,4 +78,4 @@ jobs:
|
||||
if: failure()
|
||||
run: |
|
||||
echo "### ❌ Build or Test Failed" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Please check the runner logs and test reports above for details." >> $GITHUB_STEP_SUMMARY
|
||||
echo "Please check the runner logs above for details." >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
Reference in New Issue
Block a user