Skip to content

#1594: Implement release commandlet #7100

#1594: Implement release commandlet

#1594: Implement release commandlet #7100

Workflow file for this run

name: CI Build PR
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
# Full history so Spotless can resolve origin/main and compute the merge-base (ratchet).
# Cheap here: no submodules, ~1.3k commits / ~15 MB.
fetch-depth: 0
- name: Run shell function tests
shell: bash
run: bash cli/src/test/functions-test.sh
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '25'
- name: Check formatting (Spotless, changed files only)
# Ratchets to origin/main, so only files changed by this PR are checked.
# Fix locally with: mvn spotless:apply
run: |
# mvn -B -ntp -Dstyle.color=always spotless:check
echo "skipped since spotless is broken and reports nonsense"
- name: Static analysis (Checkstyle, changed files only)
# Mirrors the pre-commit hook: lint only the Java files this PR changed
# (merge-base with origin/main), so legacy code is not retro-flagged.
run: |
CHANGED=$(git diff --name-only --diff-filter=ACM origin/main...HEAD -- '*.java')
if [ -z "$CHANGED" ]; then
echo "No changed Java files - skipping Checkstyle."
exit 0
fi
INCLUDES=$(printf '%s\n' "$CHANGED" | sed 's#.*/#**/#' | paste -sd, -)
echo "Checking changed files: $INCLUDES"
# Exclude documentation and the root aggregator (packaging=pom, no checkstyle config next to it).
# mvn -B -ntp -Dstyle.color=always checkstyle:check -Dcheckstyle.includes="$INCLUDES" -pl '!documentation,!com.devonfw.tools.IDEasy.dev:ide'
- name: Build project with Maven
run: mvn -B -ntp -Dstyle.color=always install
env:
TESTFX_HEADLESS: true #required for running ide-gui tests in headless mode
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with:
fail-on-error: false