Using Travis on private repos for student assignments


(Martin Monperrus) #1

Hi,

In my course at KTH Stockholm, students are asked to have private repos to avoid plagiarism.

However, we teach them CI and we want them to use it for their assignments (eg Travis). But Travis requires public repo.

What’s the solution? What CI service could students easily use on their private repos?

Thanks!

–Martin


(Chris Cannon) #2

@monperrus I have received private Travis-ci.com access for my GitHub classroom organization. Try reaching out to them via the contact link on travis-ci.com and I’m sure they can help you out!


Private Test Suites
(Dan Wallach) #3

Travis-CI will give you, for free, one single-threaded build service for all your students. This works very well up to the few minutes prior to a submission deadline, when all the students push their code all at once. I ended up with backlogs that took 3+ hours to clear. You should make sure your students understand they can run all the same tests locally, rather than having them rely on Travis-CI.

I bugged the Travis-CI people about getting me more concurrency, and they suggested that students could host the repos in their personal Github projects (e.g., github.com/danwallach rather than github.com/RiceComp215). I decided against this because it would be a bigger headache for the grading process. I want every repo all in one place.


(Vanessa) #4

@danwallach is correct: one concurrency per teacher. cc @ccannon94

Also, @danwallach is the workflow :crown:.


(Martin Monperrus) #5

Thanks a lot for the valuable information.

So as far I understand, I have to:

  1. register a Github organization as classroom (it would be https://github.com/KTH-DD2480)
  2. ask travisCI people to allow builds on the private repos of this organization

Correct?


(Dan Wallach) #6

Once you’ve got the Github Classroom set up working, you then need to connect your Github “organization” to travis-ci.com (note: .com, not .org), then you email support@travis-ci.com to request their educational tier of service.


(Martin Monperrus) #7

I’ve just received an answer from Travis.

If the students are part of the GitHub education program, they’ll automatically be part of ours => https://education.travis-ci.com.

So if a student’s account is tagged as “education”, Travis works out of the box, even on private repos.


(Anand Panangadan) #8

Just seconding that Travis-ci.com has worked well for us and travis-ci have been generous in giving free access to students’ private repositories created by Github Classroom. Also, each repository has to be individually enabled first. @danwallach’s script worked to do this automatically: Is there any way to automatically enable TravisCI for assignments?


(Olivier Cailloux) #9

Quick update. Nowadays it is not necessary anymore to activate repositories: with GitHub Apps you can activate all repositories (including those that are yet to be created) at once. When a .travis.yml file is added, Travis sees it and starts building.
You just have to ask for an educational program linked to your organization. Travis just wrote to me: “Normally, users can be automatically recognized based on their educational status in GitHub, but unfortunately, GitHub doesn’t provide this information for organizations and we need to process this request manually.” See https://education.travis-ci.com/.
Thank you Travis!