Files
spring-ai/.github/workflows/continuous-inspection.yml
Jonatan Ivanov 6df84845a2 Do not trigger GHA workflows on forks
GHA workflows are automatically executed on forks where they fail.
This change prevents this (only for those workflows that are
automatically triggered, e.g.: on push or schedule).
2025-05-15 17:45:59 -04:00

34 lines
931 B
YAML

name: Continuous inspection build
on:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch:
jobs:
code-quality-analysis:
name: code quality analysis report
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'spring-projects' }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Analyse test coverage with Jacoco
run: mvn -P test-coverage verify
- name: Analyse code quality with Sonar
if: github.repository == 'spring-projects/spring-ai'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}
run: mvn sonar:sonar -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_TOKEN