dummy change #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Nightly Build | |
on: | |
schedule: | |
- cron: "0 3 * * *" # Runs at 3:00 AM UTC daily | |
workflow_dispatch: # Allows manual trigger | |
push: | |
branches: ["build/201-nightly-build"] | |
paths-ignore: | |
- '.github/workflows/**' | |
- '**/*.md' | |
- '!.github/workflows/nightly_build.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
#dummy comment | |
jobs: | |
nightly_build: | |
name: Nightly Build and Report Generation | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] # If needed multi-OS add macos-13, windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Prevent Shallow Clone to satisfy Sonarqube | |
- name: Set Up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' # Cache dependencies except for target repository | |
- name: Maven Build | |
shell: bash | |
run: | | |
echo "Creating a flag file 'executeJacoco' for each module containing tests. \ | |
This triggers activation of the 'coverage' profile." | |
find . -type d | while read -r dir; do | |
if [[ -d "$dir/src/test/java" || -d "$dir/target/generated-test-sources/java" ]]; then | |
# Create an empty file target/executeJacoco if the condition is met | |
mkdir -p "$dir/target" | |
touch "$dir/target/executeJacoco" | |
fi | |
done | |
./mvnw \ | |
-Dmaven.repo.local=${{ github.workspace }}/.m2 | |
--activate-profiles reporting,javadocs,-check-api-compatibility | |
clean install | |
# add profile check-api-compatibility after fix #235 | |
- name: Archive Reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nightly-reports | |
path: | | |
**/reports/** | |
**/site/** | |
- name: Archive Assemblies | |
uses: actions/upload-artifact@v3 | |
with: | |
name: assemblies | |
path: | | |
target/*.zip | |
target/*.tar.gz |