feature/setup-workflow-pipeline: add lombok, add gitea workflow #2

Merged
chimeudeonwop merged 102 commits from feature/setup-workflow-pipeline into main 2025-10-31 16:46:56 +00:00
13 changed files with 499 additions and 276 deletions
Showing only changes of commit 79e0160e50 - Show all commits

View File

@ -99,27 +99,35 @@ jobs:
echo "Repository cloned successfully." echo "Repository cloned successfully."
# Install Maven manually # Install Maven manually
- name: Install Maven silently - name: Checkout code
run: | uses: actions/checkout@v4
MAVEN_VERSION="3.9.9"
MAVEN_DIR="/opt/maven"
wget -qO /tmp/apache-maven.tar.gz "https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz"
sudo mkdir -p "$MAVEN_DIR"
sudo tar -xzf /tmp/apache-maven.tar.gz --strip-components=1 -C "$MAVEN_DIR" >/dev/null
echo "MAVEN_HOME=$MAVEN_DIR" | sudo tee /etc/profile.d/maven.sh
echo "PATH=$MAVEN_DIR/bin:\$PATH" | sudo tee -a /etc/profile.d/maven.sh
export MAVEN_HOME="$MAVEN_DIR"
export PATH="$MAVEN_HOME/bin:$PATH"
mvn -v
# Cache Maven dependencies # 1⃣ Download OpenJDK 21 (example source URL)
- name: Cache Maven dependencies - name: Download OpenJDK 21
uses: actions/cache@v3 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
# 2⃣ Setup Java from local JDK file
- name: Set up OpenJDK 21
uses: actions/setup-java@v5
with: with:
path: ~/.m2/repository distribution: 'jdkfile' # Use locally downloaded JDK
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} jdkFile: ${{ runner.temp }}/java_package.tar.gz
restore-keys: | java-version: '21'
maven-${{ runner.os }}- architecture: x64
mvn-toolchain-vendor: 'Oracle'
cache: 'maven' # Enable Maven dependency caching
# 3⃣ Verify Java installation
- name: Verify Java setup
run: |
java -version
echo "JAVA_HOME=$JAVA_HOME"
# 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