Skip to content

Eat your own dog food #14

Eat your own dog food

Eat your own dog food #14

Workflow file for this run

name: Eat your own dog food
on:
workflow_run:
workflows: ["Continuous Deployment"]
types:
- completed
jobs:
grade-test-data:
name: Run autograding with test data
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: 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 with Test Data"
CONFIG: >
{
"tests": {
"tools": [
{
"id": "test",
"name": "Unittests",
"pattern": "**/src/test/resources/**/TEST*.xml"
}
],
"name": "JUnit",
"passedImpact": 10,
"skippedImpact": -1,
"failureImpact": -5,
"maxScore": 100
},
"analysis": [
{
"name": "Style",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/src/test/resources/**/checkstyle*.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/src/test/resources/**/pmd*.xml"
}
],
"errorImpact": 1,
"highImpact": 2,
"normalImpact": 3,
"lowImpact": 4,
"maxScore": 100
},
{
"name": "Bugs",
"tools": [
{
"id": "spotbugs",
"name": "SpotBugs",
"pattern": "**/src/test/resources/**/spotbugs*.xml"
}
],
"errorImpact": -11,
"highImpact": -12,
"normalImpact": -13,
"lowImpact": -14,
"maxScore": 100
}
],
"coverage": [
{
"tools": [
{
"id": "jacoco",
"name": "Line Coverage",
"metric": "line",
"pattern": "**/src/test/resources/**/jacoco.xml"
},
{
"id": "jacoco",
"name": "Branch Coverage",
"metric": "branch",
"pattern": "**/src/test/resources/**/jacoco.xml"
}
],
"name": "JaCoCo",
"maxScore": 100,
"coveredPercentageImpact": 1,
"missedPercentageImpact": -1
},
{
"tools": [
{
"id": "pit",
"name": "Mutation Coverage",
"metric": "mutation",
"pattern": "**/src/test/resources/**/mutations.xml"
}
],
"name": "PIT",
"maxScore": 100,
"coveredPercentageImpact": 1,
"missedPercentageImpact": -1
}
]
}
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 -Ppit
- 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/*-reports/TEST*.xml"
}
],
"name": "JUnit",
"passedImpact": 0,
"skippedImpact": -1,
"failureImpact": -5,
"maxScore": 100
},
"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
}
]
}