Third pass
Build and Test j3270 / Build JAR & Run Tests (push) Failing after 7m10s

This commit is contained in:
2026-08-20 18:45:27 -04:00
parent cc2ee5d2d9
commit 47f177c8aa
2 changed files with 32 additions and 30 deletions
+16 -15
View File
@@ -23,31 +23,34 @@ jobs:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Ensure Java JDK Available - name: Ensure Java & Build Tools Available
run: | run: |
if ! command -v javac >/dev/null 2>&1; then if ! command -v javac >/dev/null 2>&1 || ! command -v gradle >/dev/null 2>&1; then
echo "javac not found in PATH, installing OpenJDK..." echo "Installing JDK 17 and Gradle via package manager..."
if command -v apt-get >/dev/null 2>&1; then if command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y openjdk-17-jdk-headless apt-get update && apt-get install -y openjdk-17-jdk-headless gradle || true
elif command -v apk >/dev/null 2>&1; then elif command -v apk >/dev/null 2>&1; then
apk add --no-cache openjdk17 apk add --no-cache openjdk17 gradle || true
fi fi
fi fi
echo "Using Java compiler:" echo "Java compiler:"
javac -version || which javac javac -version || which javac || true
echo "Using Java runtime:" echo "Java runtime:"
java -version || which java java -version || which java || true
echo "Gradle:"
gradle -version || echo "Gradle not available"
- name: Make scripts executable - name: Make scripts executable
run: | run: |
chmod +x ./build_all.sh ./gradlew ./run.sh chmod +x ./build_all.sh ./run.sh
- name: Run Unit Tests - name: Run Unit Tests
run: | run: |
if command -v gradle >/dev/null 2>&1; then if command -v gradle >/dev/null 2>&1; then
echo "Running Gradle unit tests..."
gradle test --info gradle test --info
else else
echo "Testing via build_all.sh..." echo "Gradle not found; running standalone build verification..."
sh ./build_all.sh sh ./build_all.sh
fi fi
@@ -56,23 +59,21 @@ jobs:
sh ./build_all.sh sh ./build_all.sh
- name: Upload j3270 Executable JAR Artifact - name: Upload j3270 Executable JAR Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
continue-on-error: true continue-on-error: true
with: with:
name: j3270-executable-jar name: j3270-executable-jar
path: build/j3270.jar path: build/j3270.jar
if-no-files-found: warn
- name: Upload Test Reports - name: Upload Test Reports
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
continue-on-error: true continue-on-error: true
with: with:
name: test-reports name: test-reports
path: | path: |
lib3270j/build/reports/tests/ lib3270j/build/reports/tests/
j3270/build/reports/tests/ j3270/build/reports/tests/
if-no-files-found: ignore
- name: Report Build Status - name: Report Build Status
if: failure() if: failure()
+16 -15
View File
@@ -23,31 +23,34 @@ jobs:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Ensure Java JDK Available - name: Ensure Java & Build Tools Available
run: | run: |
if ! command -v javac >/dev/null 2>&1; then if ! command -v javac >/dev/null 2>&1 || ! command -v gradle >/dev/null 2>&1; then
echo "javac not found in PATH, installing OpenJDK..." echo "Installing JDK 17 and Gradle via package manager..."
if command -v apt-get >/dev/null 2>&1; then if command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y openjdk-17-jdk-headless apt-get update && apt-get install -y openjdk-17-jdk-headless gradle || true
elif command -v apk >/dev/null 2>&1; then elif command -v apk >/dev/null 2>&1; then
apk add --no-cache openjdk17 apk add --no-cache openjdk17 gradle || true
fi fi
fi fi
echo "Using Java compiler:" echo "Java compiler:"
javac -version || which javac javac -version || which javac || true
echo "Using Java runtime:" echo "Java runtime:"
java -version || which java java -version || which java || true
echo "Gradle:"
gradle -version || echo "Gradle not available"
- name: Make scripts executable - name: Make scripts executable
run: | run: |
chmod +x ./build_all.sh ./gradlew ./run.sh chmod +x ./build_all.sh ./run.sh
- name: Run Unit Tests - name: Run Unit Tests
run: | run: |
if command -v gradle >/dev/null 2>&1; then if command -v gradle >/dev/null 2>&1; then
echo "Running Gradle unit tests..."
gradle test --info gradle test --info
else else
echo "Testing via build_all.sh..." echo "Gradle not found; running standalone build verification..."
sh ./build_all.sh sh ./build_all.sh
fi fi
@@ -56,23 +59,21 @@ jobs:
sh ./build_all.sh sh ./build_all.sh
- name: Upload j3270 Executable JAR Artifact - name: Upload j3270 Executable JAR Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
continue-on-error: true continue-on-error: true
with: with:
name: j3270-executable-jar name: j3270-executable-jar
path: build/j3270.jar path: build/j3270.jar
if-no-files-found: warn
- name: Upload Test Reports - name: Upload Test Reports
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
continue-on-error: true continue-on-error: true
with: with:
name: test-reports name: test-reports
path: | path: |
lib3270j/build/reports/tests/ lib3270j/build/reports/tests/
j3270/build/reports/tests/ j3270/build/reports/tests/
if-no-files-found: ignore
- name: Report Build Status - name: Report Build Status
if: failure() if: failure()