ma jdk ch 21
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Successful in 11s
checks / Set up Java for Backend Tests and Build (push) Failing after 13s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 3s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Successful in 10s
checks / Set up Java for Backend Tests and Build (pull_request) Failing after 12s
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Successful in 11s
checks / Set up Java for Backend Tests and Build (push) Failing after 13s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 3s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Successful in 10s
checks / Set up Java for Backend Tests and Build (pull_request) Failing after 12s
This commit is contained in:
@ -88,45 +88,25 @@ jobs:
|
|||||||
#image: eclipse-temurin:21-jdk
|
#image: eclipse-temurin:21-jdk
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java 21 manually
|
- name: Set up Java 21 (Temurin)
|
||||||
run: |
|
uses: actions/setup-java@v5
|
||||||
download_url="https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz"
|
with:
|
||||||
wget -q -O /tmp/jdk.tar.gz $download_url
|
distribution: 'temurin'
|
||||||
mkdir -p /opt/jdk
|
java-version: '21'
|
||||||
tar -xzf /tmp/jdk.tar.gz -C /opt/jdk --strip-components=1
|
cache-dependency-path: 'pom.xml' # optional
|
||||||
echo "JAVA_HOME=/opt/jdk" >> $GITHUB_ENV
|
cache: 'maven'
|
||||||
echo "/opt/jdk/bin" >> $GITHUB_PATH
|
package: 'maven'
|
||||||
|
|
||||||
- name: Verify Java setup
|
- name: Verify Java setup
|
||||||
run: |
|
run: |
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
# Install Maven manually
|
|
||||||
- name: Download and extract OpenJDK 21
|
|
||||||
run: |
|
|
||||||
download_url="https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz"
|
|
||||||
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
|
||||||
|
|
||||||
mkdir -p $RUNNER_TEMP/jdk-extracted
|
|
||||||
tar -xzf $RUNNER_TEMP/java_package.tar.gz -C $RUNNER_TEMP/jdk-extracted
|
|
||||||
|
|
||||||
# Detect the inner directory name (e.g., jdk-21.0.1)
|
|
||||||
extracted_dir=$(find $RUNNER_TEMP/jdk-extracted -maxdepth 1 -type d -name "jdk*" | head -n 1)
|
|
||||||
|
|
||||||
echo "Detected JDK directory: $extracted_dir"
|
|
||||||
echo "JAVA_HOME=$extracted_dir" >> $GITHUB_ENV
|
|
||||||
echo "$extracted_dir/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Verify Java setup
|
- name: Verify Java setup
|
||||||
run: |
|
run: |
|
||||||
ls -l $JAVA_HOME/bin/java
|
ls -l $JAVA_HOME/bin/java
|
||||||
file $JAVA_HOME/bin/java || true
|
file $JAVA_HOME/bin/java || true
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
# 4️⃣ Build and test with Maven
|
|
||||||
- name: Build with Maven
|
|
||||||
run: mvn -B verify
|
|
||||||
|
|
||||||
# Run backend tests and build
|
# Run backend tests and build
|
||||||
- name: Test & build backend
|
- name: Test & build backend
|
||||||
working-directory: ./src
|
working-directory: ./src
|
||||||
|
|||||||
Reference in New Issue
Block a user