Assignment Template for GitHub Classroom
This tutorial will guide you through creating your assignment locally and configuring it on GitHub Classroom. Follow the step-by-step instructions carefully to ensure each step is completed correctly.
- Create a new repository by clicking the
Use this template
button. - Rename the repository using the format
2024-Fall-HW*
. - Choose repository visibility;
Public
is recommended. - Design your assignment in the
src/
andtest/
folders.- Grading should be based on whether the Foundry tests pass or fail.
- Do not support analyzing output content for grading.
- If you install external libraries, run
forge remappings
to link them.
- Update the autograding configuration in
.github/workflows/test.yml
.- Copy the
Problem Template
and adjust thename
,id
,test-name
,command
,timeout
, andmax-score
. - Add a new entry in
Autograding Reporter
(at the end of the YAML configuration).
- Copy the
- Commit the changes and push them to GitHub.
- Check the GitHub Actions and open the
Autograding Tests
workflow to ensure the auto-grading succeeds.
- Go to the relevant GitHub Classroom page.
- Click the green
+ New Assignment
button. - Set up the
Assignment basics
section.- Enter the assignment title using the format `2024-Fall-HW*``.
- Select deadline, and select
This is a cutoff date
[1]. - Select individual / group assignment
- Setup
Starter code and environment
section- Select the repo for this assignment in the
Find a GitHub repository section
. - Choose repo visibility, recommend
Private
[2] access.
- Select the repo for this assignment in the
- Setup
Grading and feedback
section- Leave the
Add autograding tests
section empty, as grading rules are already configured. - Enter protected file path, recommend adding
.github/**/*
since grading rules should not be altered[3]. - Select
Enable feedback pull requests
to create PR on each assignment.
- Leave the
- Finish assignment creation, send the invitation code to the students and starting coding!
NOTE:
[1] Once the cutoff date option is selected, student will lose write access to their repository after deadline.
[2] Private
access means students will create private repositories when receiving the invitation link.
[3] For CTF problems, the src/
folder should be locked. If students need to fill in blanks in the source contract, consider locking the corresponding test files.
- Check the students' repositories by clicking the
Repository
button on the right side. - Provide feedback by clicking the
Feedback
button on the right side and leave comments on the PR. - Verify whether students have submitted the assignment and review grading results.
- Check if students have altered any protected files or folders.
There are several examples: