code coverage: add JaCoCo report merge #91
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: | |
| pull_request: | |
| types: [opened, reopened] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| cache: maven | |
| - name: Cache JaCoCo CLI | |
| id: cache-jacoco | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/jacoco-0.8.14 | |
| key: ${{ runner.os }}-jacoco-cli-${{ hashFiles('generate-jacoco-report.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-jacoco-cli- | |
| - name: Build with Maven | |
| run: mvn --batch-mode --update-snapshots package | |
| - name: Generate JaCoCo Report | |
| run: | | |
| chmod +x ./generate-jacoco-report.sh | |
| ./generate-jacoco-report.sh | |
| - name: Upload JaCoCo Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: JaCoCo Coverage Report | |
| path: target/coverage-reports/site | |
| - name: JUnit test report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: always() | |
| with: | |
| check_name: junit test report | |
| report_paths: "**/target/surefire-reports/*.xml" | |
| - name: Run pynfs tests in container | |
| id: tester | |
| run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f full-test.yml up --build --quiet-pull --exit-code-from tester | |
| - name: Pynfs Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: always() | |
| with: | |
| check_name: pynfs protocol compatibility test | |
| report_paths: "report/*.xml" |