github-education-resources / autograding

GitHub Education Auto-grading and Feedback for GitHub Classroom
MIT License
59 stars 68 forks source link

Auto-grading Support for Scala #57

Closed vmaravind96 closed 2 years ago

vmaravind96 commented 2 years ago

Hi team,

In Grading and feedback, currently there is no option for running Scala tests. Kindly include feature for running tests in Scala.

image

Thanks !

markpatterson27 commented 2 years ago

There's nothing special about the 'Run Java', 'Run Node', 'Run Python', etc options. They just prepopulate the run command field with a typical 'run tests' command for that language (i.e. for Java it's gradle test). You can just use the 'Run command' option and input your own command for running Scala tests.

I have no experience with using Scala, so I'm not sure if it's supported on the GitHub runner (You can find what software is pre-installed at this link: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md). You might need to use a custom workflow to setup Scala on the runner yourself before calling the autograding action. In this case, include .github/workflows/classroom.yml and .github/classroom/autograding.json in your template repo and don't touch the classroom interface for autograding tests.

vmaravind96 commented 2 years ago

Perfect thanks! I see sbt pre-installed in the link that you have given. We use sbt to run Scala tests. It worked as well when I execute the command.