diff --git a/.github/workflows/autograding.yml b/.github/workflows/autograding.yml deleted file mode 100644 index 7ade4850..00000000 --- a/.github/workflows/autograding.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: 'Build and autograde' - -on: - push: - branches: - - master - - main - pull_request: - -jobs: - Build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '11' - check-latest: true - cache: 'maven' - - name: Compile, Test and Analysis - run: mvn -V --color always -ntp clean verify -Dmaven.test.failure.ignore=true | tee maven.log - - name: Mutation Coverage - run: mvn -V --color always -ntp org.pitest:pitest-maven:mutationCoverage - - name: Autograding - uses: uhafner/autograding-github-action@v1.7.3 - with: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - HEAD_SHA: ${{github.event.pull_request.head.sha}} - CONFIG: > - { - "analysis": { - "tools": [ - { - "id": "error-prone", - "pattern": "**/*.log" - }, - { - "id": "java", - "pattern": "**/*.log" - }, - { - "id": "javadoc-warnings", - "pattern": "**/*.log" - }, - { - "id": "checkstyle", - "pattern": "**/checkstyle-result.xml" - }, - { - "id": "pmd", - "pattern": "**/pmd.xml" - }, - { - "id": "spotbugs", - "pattern": "**/spotbugsXml.xml" - } - ], - "maxScore": 100, - "errorImpact": -5, - "highImpact": -2, - "normalImpact": -1, - "lowImpact": -1 - }, - "tests": { - "maxScore": 100, - "passedImpact": 0, - "failureImpact": -5, - "skippedImpact": -1 - }, - "coverage": { - "maxScore": 100, - "coveredPercentageImpact": 0, - "missedPercentageImpact": -1 - }, - "pit": { - "maxScore": 100, - "detectedImpact": 0, - "undetectedImpact": -1, - "detectedPercentageImpact": 0, - "undetectedPercentageImpact": 0 - } - } diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 16aca89c..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: 'Generate coverage report' - -on: - push: - branches: - - master - - main - pull_request: - -jobs: - coverage: - - runs-on: ubuntu-latest - name: Coverage on Ubuntu - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '11' - check-latest: true - - name: Generate coverage with JaCoCo - run: mvn -V --color always -ntp clean verify --file pom.xml '-Dgpg.skip' - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: 'target/site/jacoco/jacoco.xml' - token: ${{secrets.CODECOV_TOKEN}} diff --git a/.github/workflows/reporting.yml b/.github/workflows/reporting.yml index cfa7a6bd..6ea029fa 100644 --- a/.github/workflows/reporting.yml +++ b/.github/workflows/reporting.yml @@ -30,29 +30,97 @@ jobs: - name: Mutation Coverage run: mvn -V --color always -ntp org.pitest:pitest-maven:mutationCoverage - name: Autograding - uses: uhafner/autograding-github-action@v1.7.3 + uses: uhafner/autograding-github-action@v2.0.0-alpha-2 with: TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_SHA: ${{github.event.pull_request.head.sha}} CONFIG: > { - "analysis": { - "maxScore": 100, - "errorImpact": -5, - "highImpact": -2, - "normalImpact": -1, - "lowImpact": -1 - }, "tests": { - "maxScore": 100, - "failureImpact": -10 - }, - "coverage": { - "maxScore": 100, - "missedPercentageImpact": -1 + "tools": [ + { + "id": "test", + "name": "Unittests", + "pattern": "**/target/*-reports/TEST*.xml" + } + ], + "name": "JUnit", + "passedImpact": 0, + "skippedImpact": -1, + "failureImpact": -5, + "maxScore": 100 }, - "pit": { - "maxScore": 100, - "undetectedPercentageImpact": -1 - } + "analysis": [ + { + "name": "Style", + "tools": [ + { + "id": "checkstyle", + "name": "CheckStyle", + "pattern": "**/target/checkstyle-result.xml" + }, + { + "id": "pmd", + "name": "PMD", + "pattern": "**/target/pmd.xml" + } + ], + "errorImpact": 1, + "highImpact": 2, + "normalImpact": 3, + "lowImpact": 4, + "maxScore": 100 + }, + { + "name": "Bugs", + "tools": [ + { + "id": "spotbugs", + "name": "SpotBugs", + "pattern": "**/target/spotbugsXml.xml" + } + ], + "errorImpact": -11, + "highImpact": -12, + "normalImpact": -13, + "lowImpact": -14, + "maxScore": 100 + } + ], + "coverage": [ + { + "tools": [ + { + "id": "jacoco", + "name": "Line Coverage", + "metric": "line", + "pattern": "**/target/site/jacoco/jacoco.xml" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch", + "pattern": "**/target/site/jacoco/jacoco.xml" + } + ], + "name": "JaCoCo", + "maxScore": 100, + "coveredPercentageImpact": 1, + "missedPercentageImpact": -1 + }, + { + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation", + "pattern": "**/target/pit-reports/mutations.xml" + } + ], + "name": "PIT", + "maxScore": 100, + "coveredPercentageImpact": 1, + "missedPercentageImpact": -1 + } + ] }