Skip to content

49 implement a bean definition scanner #77

49 implement a bean definition scanner

49 implement a bean definition scanner #77

Workflow file for this run

name: Build, Test, and Analyze
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build-and-analyze:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Set up Java environment
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
# Step 3: Cache Gradle dependencies
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-cache-${{ runner.os }}
# Step 4: Build the project and run static code analysis with Checkstyle
- name: Run Checkstyle
run: ./gradlew checkstyleMain checkstyleTest
# Step 5: Run OWASP Dependency Check
- name: Run Dependency Check
timeout-minutes: 10
continue-on-error: true
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: ./gradlew dependencyCheckAnalyze
# Step 6: Run tests and generate JaCoCo coverage report
- name: Run tests with JaCoCo
run: ./gradlew test jacocoTestReport
env:
CI: true
# Step 7: Run SonarCloud Analysis
- name: SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar -Dsonar.token=$SONAR_TOKEN