diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ba9428f..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: CI - -on: - push: - branches: [ master, main ] - pull_request: - branches: [ master, main ] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Build and test with coverage - run: | - BUILD_OK=true - TEST_OK=true - COVERAGE_OK=true - - # Build - if ! mvn -B clean compile -Dmaven.test.skip=true -Djava.awt.headless=true 2>&1; then - BUILD_OK=false - echo "::warning::Build failed — legacy code may need updates for Java 17" - fi - - # Test + JaCoCo - if $BUILD_OK; then - if ! mvn -B test -Djava.awt.headless=true 2>&1; then - TEST_OK=false - echo "::warning::Some tests failed" - fi - fi - - # Coverage check - if $BUILD_OK && $TEST_OK; then - if ! mvn -B verify -Dmaven.test.skip=true -Djava.awt.headless=true 2>&1; then - COVERAGE_OK=false - echo "::warning::Coverage below 100%" - fi - fi - - echo "BUILD_OK=$BUILD_OK" >> $GITHUB_ENV - echo "TEST_OK=$TEST_OK" >> $GITHUB_ENV - echo "COVERAGE_OK=$COVERAGE_OK" >> $GITHUB_ENV - - - name: Coverage summary - if: always() - run: | - echo "## CI Status" >> $GITHUB_STEP_SUMMARY - echo "| Step | Status |" >> $GITHUB_STEP_SUMMARY - echo "|------|--------|" >> $GITHUB_STEP_SUMMARY - [ "$BUILD_OK" = "true" ] && echo "| Build | ✅ |" >> $GITHUB_STEP_SUMMARY || echo "| Build | ❌ |" >> $GITHUB_STEP_SUMMARY - [ "$TEST_OK" = "true" ] && echo "| Tests | ✅ |" >> $GITHUB_STEP_SUMMARY || echo "| Tests | ❌ |" >> $GITHUB_STEP_SUMMARY - [ "$COVERAGE_OK" = "true" ] && echo "| Coverage 100% | ✅ |" >> $GITHUB_STEP_SUMMARY || echo "| Coverage 100% | ❌ |" >> $GITHUB_STEP_SUMMARY - - if [ -f target/site/jacoco/jacoco.csv ]; then - echo "" >> $GITHUB_STEP_SUMMARY - echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - awk -F',' 'NR>1 {missed+=$4; covered+=$5} END {total=missed+covered; if(total>0) printf "Line Coverage: %d/%d (%.1f%%)\nMissed: %d lines\n", covered, total, covered*100/total, missed; else print "No coverage data"}' target/site/jacoco/jacoco.csv >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Per-class" >> $GITHUB_STEP_SUMMARY - echo '| Class | Coverage | Lines |' >> $GITHUB_STEP_SUMMARY - echo '|-------|----------|-------|' >> $GITHUB_STEP_SUMMARY - awk -F',' 'NR>1 {total=$4+$5; if(total>0) pct=$5*100/total; else pct=100; printf "| %s.%s | %.0f%% | %d/%d |\n", $2, $3, pct, $5, total}' target/site/jacoco/jacoco.csv >> $GITHUB_STEP_SUMMARY - fi - - - name: Upload coverage - if: always() - uses: codecov/codecov-action@v4 - with: - file: target/site/jacoco/jacoco.xml - fail_ci_if_error: false - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 8230ce7..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,34 +0,0 @@ -# JavaPatterns — Шаблоны проектирования на Java - -## About - -Шаблоны проектирования на Java - -## Prerequisites - -- JDK 8+ -- Maven 3.x - -## Build & Run - -```bash -mvn clean install -mvn test -``` - -## Development Guidelines - -### Code Style -- Follow standard Java conventions -- Keep code clean and well-organized -- Use meaningful variable and method names - -### Git Workflow -- Write clear, descriptive commit messages -- One logical change per commit -- Test before committing - -### Testing -- Write tests for new functionality -- Run the full test suite before pushing -- Keep tests focused and independent diff --git a/pom.xml b/pom.xml index b69156f..95edbf9 100644 --- a/pom.xml +++ b/pom.xml @@ -17,10 +17,9 @@ - org.junit.jupiter - junit-jupiter - 5.11.4 - test + junit + junit + RELEASE @@ -31,7 +30,8 @@ org.apache.maven.plugins maven-compiler-plugin - 17 + 1.8 + 1.8 @@ -41,50 +41,7 @@ UTF-8 - - - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - prepare-agent - prepare-agent - - - report - test - report - - - check - verify - check - - - - BUNDLE - - - LINE - COVEREDRATIO - 1.00 - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.5.2 - - + \ No newline at end of file