github-education-resources / autograding

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

Unable to run command test for a go program #70

Open ruthvik-github opened 1 year ago

ruthvik-github commented 1 year ago

Hello,

I have created an assignment to write a go program and created tests for the same. One test is input-output test for STDIN and STDOUT, which checks if the program returns the expected value. Second test is run command which will run "echo "3 2 1" | ./opgame" Terminal command that passes the input to test. However when I run the script I get following error image

As shown in image it is asking for build cache, GOCACHE Is it possible to write auto-grading for GO programming language.

markpatterson27 commented 1 year ago

AFAIK, Go only needs the $HOME env var to be set. I have a PR to enable this #53

In the meantime, you could try setting the env var on each process run by prepending each grading command with $HOME=/home/runner. e.g. $HOME=/home/runner echo "3 2 1" | ./opgame or see https://github.com/education/autograding/issues/23#issuecomment-1196042848