I’m a professor using GitHub as the student repository for programming assignments (C#/Visual Studio, HTML, etc.). Students turn in code to me by posting a GitHub link in Canvas, our course management system. For some completed assignments, I want to execute/test the student code submissions. But, I haven’t really figured out how to easily download their C# submitted code back into Visual Studio where I can run/test it. Same issue for testing .html and .ccs files. I am fairly new to GitHub so I think I’m missing something easy. Any training available for using GitHub in the classroom or ideas to streamline my program reviews? THANKS in advance. Michael
There are many ways to go about it, depending on whether you want these tests to be carried online (by a CI service) or locally (on your office machine/server).
Once you have a link to your students assignments (I’m assuming they’re published as repositories), you should be able to use some script that forks their repository (on GitHub) and then adds some CI testing scripts that you could then execute on your fork, and have it send to you a status report (passed/failed) via email, or whatever.
I’m assuming here that your students should be given directives on how to structure their repository according to some guidelines, which is what would allow you to tests them via automation (e.g. strict filenames conventions, etc.).
The easiest way IMO would be for you to create a GitHub repository template and ask your students to build their project on top of it — this would allow you to provide some scaffolding, instructions, validation scripts, and also enforce some repository configurations, etc., which will ultimately make it easier for you to test their final assignment repository.
As for doing so locally, you’ll have to setup some scripts that will take those links and clone their repository locally, and then handle all the validation on you local machine.
Personally, I’d rather rely on some online CI service (GH Actions, Travis CI, Circle CI, etc.), which will require a bit of initial setup on your side, but will ensure stronger services and options.
Thanks! Very helpful.