Skip to content

Bump org.springframework.cloud:spring-cloud-dependencies from 2023.0.0 to 2025.1.0 #18

Bump org.springframework.cloud:spring-cloud-dependencies from 2023.0.0 to 2025.1.0

Bump org.springframework.cloud:spring-cloud-dependencies from 2023.0.0 to 2025.1.0 #18

Workflow file for this run

name: PR Validation
on:
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened]
env:
JAVA_VERSION: '17'
jobs:
validate:
name: Validate Pull Request
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: loadbalancer
MYSQL_USER: loadbalancer
MYSQL_PASSWORD: loadbalancer
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout PR code
uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: maven
- name: Validate Maven projects
run: |
echo "Validating Load Balancer..."
mvn validate
echo "Validating Storage Node..."
cd storage-node && mvn validate
- name: Compile Load Balancer
run: mvn clean compile
- name: Compile Storage Node
run: |
cd storage-node
mvn clean compile
- name: Run Load Balancer Tests
run: mvn test
env:
SPRING_DATASOURCE_URL: jdbc:mysql://localhost:3306/loadbalancer
SPRING_DATASOURCE_USERNAME: loadbalancer
SPRING_DATASOURCE_PASSWORD: loadbalancer
- name: Run Storage Node Tests
run: |
cd storage-node
mvn test
- name: Check Code Style
run: |
mvn spotless:check || echo "Code style issues found"
cd storage-node && mvn spotless:check || echo "Storage node code style issues found"
continue-on-error: true
- name: Build Docker Images
run: |
# Build Load Balancer
mvn package -DskipTests
docker build -t test-loadbalancer .
# Build Storage Node
cd storage-node
mvn package -DskipTests
docker build -t test-storagenode .
- name: Test Docker Compose Configuration
run: |
docker-compose config --quiet
- name: Security Scan
uses: securecodewarrior/github-action-add-sarif@v1
with:
sarif-file: 'security-scan.sarif'
continue-on-error: true
- name: Comment PR Results
uses: actions/github-script@v7
if: always()
with:
script: |
const { context } = require('@actions/github');
const jobStatus = '${{ job.status }}';
let comment = `## 🔍 PR Validation Results\n\n`;
if (jobStatus === 'success') {
comment += `✅ **All checks passed!** This PR is ready for review.\n\n`;
comment += `### What was tested:\n`;
comment += `- ✅ Code compilation\n`;
comment += `- ✅ Unit tests\n`;
comment += `- ✅ Docker image builds\n`;
comment += `- ✅ Docker Compose configuration\n`;
} else {
comment += `❌ **Some checks failed.** Please review the issues below.\n\n`;
comment += `Check the [workflow run](${context.payload.pull_request.html_url}/checks) for details.\n`;
}
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});