diff --git a/.github/workflows/dogfood.yml b/.github/workflows/dogfood.yml index 51071ceb..60a52bd9 100644 --- a/.github/workflows/dogfood.yml +++ b/.github/workflows/dogfood.yml @@ -119,3 +119,118 @@ jobs: } ] } + grade-github-action: + name: Eat your own dog food + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + check-latest: true + cache: 'maven' + - name: Set up Maven + uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.9.5 + - name: Build + run: mvn -ntp clean verify + - name: Run Autograding + uses: uhafner/autograding-github-action@v2.0.0-alpha-2 + with: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + HEAD_SHA: ${{github.event.pull_request.head.sha}} + CHECKS_NAME: "Autograding GitHub Action" + CONFIG: > + { + "tests": { + "tools": [ + { + "id": "test", + "name": "Unittests", + "pattern": "**/target/**/TEST*.xml" + } + ], + "name": "JUnit", + "passedImpact": 10, + "skippedImpact": -1, + "failureImpact": -5, + "maxScore": 100 + }, + "analysis": [ + { + "name": "Style", + "tools": [ + { + "id": "checkstyle", + "name": "CheckStyle", + "pattern": "**/target/**/checkstyle*.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/**/spotbugs*.xml" + } + ], + "errorImpact": -11, + "highImpact": -12, + "normalImpact": -13, + "lowImpact": -14, + "maxScore": 100 + } + ], + "coverage": [ + { + "tools": [ + { + "id": "jacoco", + "name": "Line Coverage", + "metric": "line", + "pattern": "**/target/**/jacoco.xml" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch", + "pattern": "**/target/**/jacoco.xml" + } + ], + "name": "JaCoCo", + "maxScore": 100, + "coveredPercentageImpact": 1, + "missedPercentageImpact": -1 + }, + { + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation", + "pattern": "**/target/**/mutations.xml" + } + ], + "name": "PIT", + "maxScore": 100, + "coveredPercentageImpact": 1, + "missedPercentageImpact": -1 + } + ] + } +