Ok, so this might sound a bit weird but here it goes.
I am teaching a data structures and algorithms lab at my local university and want to give my students a every fluid and fun experience. Up until now, I used a simple git repository which every student forked, and whenever they completed an assignment, they made a push + pull request, I would review their code and if everything was OK, I would merge the pull request into the main repo. This works pretty well, but I want to do something more interesting.
The lab is being taught in C (not even C++) (and no, I don't want to enter any polemics on why another language would be better). What I want to do is have something like a Jenkins build run on every push a pupil makes which verifies some predefined tests for the task at hand.
For example, for week 2, I would give them a homework assignment with lists. I would like to write the tests for this homework myself and then automatically verify what they did using those tests.
What I have available:
- 24/7 running CentOS machine which I can use to put anything on (I have Jenkins and Tomcat running on it atm)
- enough time and willpower to try to make their experience in this lab well worth the while
++ a very nice 'add-on' to all this would be to use something like sonar as a code verifier AND check for duplicated code within their branches (as to see if anyone copied an answer from someone else)
Am I on the right track by going for a Jenkins server, thinking about sonar etc? Am I way off? I don't think this is impossible. It might be difficult, yes, but that makes it fun ^^
The 'flow' that I want is:
- each student is part of a git organization + repo
- they create a branch from the local master (I will impose a restriction like 'only use a subfolder with your name')
- the master branch will contain the tests
- they will work on their homework on their branch and then push it to Jenkins / Gerrit / whatever
- the branch will somehow be tested and if all tests pass, it will be merged with the master.
On behalf of my dear students, thank you.