Action quick start¶
Copy the tested static definition
to .github/autograder/definition.json in the repository being graded.
This static evaluator does not require a sandbox or provider. Add index.html
and an ordinary workflow; its job name is arbitrary:
name: Grade
on: [push, workflow_dispatch]
permissions:
contents: read
jobs:
assess:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webtech-network/autograder@main
id: grade
with:
locale: pt-br
- uses: actions/upload-artifact@v4
if: always()
with:
name: grading-outcome
path: .autograder/
Code that runs¶
The same workflow grades criteria that run the submission. Replace the
definition with the tested Python I/O definition
and commit a main.py that prints the sum of two input lines; for a compiled
language, the C I/O definition compiles
main.c in a setup command first. Nothing else changes: on ubuntu-latest the
Action runs the program in a sandbox on the runner's Docker, with no network
and none of the workflow's tokens, and removes it before the step ends
(requirements). CI runs exactly this workflow on every
change to the Action.
Check the definition first¶
Before students push, check the definition and grade a reference solution with
it. From a checkout of this repository (uv sync), with the reference solution
in a directory:
python -m execution_host.check .github/autograder/definition.json --submission solution
The command compiles the definition exactly as the Action does, prints each
error at its JSON path, and grades each --submission directory as the Action
reads a checkout, with sandboxes on the local Docker. Its options, exit
statuses and a CI workflow that runs it are in
Test your rubric.
Results¶
The Action summary shows status and authoritative score. The artifact contains the canonical outcome and optional feedback. Feedback generation does not edit a repository branch. A low grade completes successfully; add your own workflow threshold gate if needed.
To write your own definition, follow the Author tutorial
and test it before committing it. A definition in an
earlier format ("schema_version": "1.0", or the split criteria.json,
feedback.json, setup.json assembled into one envelope) is
converted offline.
When the graded files live in a subdirectory, set submission-root to it and
definition-path to the definition inside it.
See cloud publication for cloud configuration and optional post-grading upload.