Skip to content

Issue-113 bump version #493

Issue-113 bump version

Issue-113 bump version #493

Workflow file for this run

name: Java CI
on:
push:
pull_request:
branches: [ main, master, 1.x, develop ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and install modules in dependency order
run: |
echo "πŸ—οΈ Building and installing modules in dependency order..."
echo "This ensures all internal dependencies are available locally before testing"
# Module build order (based on dependencies)
MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber")
for module in "${MODULES[@]}"; do
if [ -d "$module" ]; then
echo "πŸ“¦ Building and installing $module..."
cd "$module"
# Show what version we're building
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo " Building version: $VERSION"
# Install locally (this makes it available for other modules)
if mvn clean install -DskipTests -B; then
echo "βœ… $module v$VERSION built and installed successfully"
else
echo "❌ Failed to build $module"
exit 1
fi
cd ..
else
echo "❌ Module $module not found!"
exit 1
fi
done
echo "βœ… All modules built and installed locally"
echo "πŸ” Checking what's in local Maven repository:"
ls -la ~/.m2/repository/io/testomat/ || echo "Nothing found yet"
- name: Run tests for all modules
run: |
echo "πŸ§ͺ Running tests for all modules..."
MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber")
for module in "${MODULES[@]}"; do
if [ -d "$module" ]; then
echo "πŸ§ͺ Testing $module..."
cd "$module"
mvn test -B
if [ $? -ne 0 ]; then
echo "❌ Tests failed for $module"
exit 1
fi
cd ..
echo "βœ… Tests passed for $module"
else
echo "⚠️ Module $module not found, skipping tests..."
fi
done
echo "βœ… All tests completed successfully"