Refactor source code structure and improve code quality #1
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: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| 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 package -B | |
| - name: Run tests | |
| run: mvn test -B | |
| - name: Generate coverage report | |
| if: matrix.java == '17' | |
| run: mvn jacoco:report | |
| - name: Upload build artifacts | |
| if: matrix.java == '17' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: package | |
| path: target/*.jar |