feat: implement checkpoint and resume mechanism (Issue #40) #14
This file contains hidden or 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: Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [ '17', '21' ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build with Maven | |
| run: mvn clean compile -B | |
| - name: Run unit tests | |
| run: mvn test -B | |
| - name: Run integration tests | |
| run: mvn verify -B -DskipUnitTests | |
| - name: Check code style | |
| run: mvn checkstyle:check -B | |
| continue-on-error: true | |
| - name: Run SpotBugs | |
| run: mvn spotbugs:check -B | |
| continue-on-error: true | |
| - name: Generate test coverage report | |
| run: mvn jacoco:report -B | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./target/site/jacoco/jacoco.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| continue-on-error: true | |
| - name: Archive test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-jdk-${{ matrix.java }} | |
| path: | | |
| **/target/surefire-reports/ | |
| **/target/failsafe-reports/ | |
| retention-days: 7 | |
| - name: Archive coverage results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-jdk-${{ matrix.java }} | |
| path: | | |
| **/target/site/jacoco/ | |
| retention-days: 7 | |
| quality-check: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Run code quality analysis | |
| run: mvn verify -B -DskipTests | |
| - name: Check for vulnerabilities | |
| run: mvn dependency-check:check -B | |
| continue-on-error: true | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build development environment | |
| run: | | |
| cd docker | |
| docker compose build |