I set up a Github action to:
- Run tests when Consensys-Academy updates or creates a Pull Request against master
- Set up tests to be run by students when they fork the exercise repo
- N.B. Students will have to enable GitHub actions when they fork. I view this as a good thing as it's never too early to start being aware of these concerns.
Some neat mechanics in this GH action
- checks out a version of the tests from commit history so Student cannot
cheat. N.b. this currently uses a
tag
and will have to change to match the actual github commit when finalized. - uses GH action context to load the appropriate tests discriminating on repo owner. That is, if the owner is Consensys-Academy one easy integration test runs to indicate tests are setup, or a version of the tests that checks all contract behavior.
Check out these two Actions report:
- CA's repo Notice that check mark!
* Examine the CI
details.
Note the step for
Setup for Consensys Academy
- My forked repo Notice that check mark!
* CI
details
Notice how it has a step for
Setup student grading