From 54a650d02a02b6ac5189d30b2c707017a74fbe3a Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 25 Sep 2024 09:31:39 +0800 Subject: [PATCH] Add JOJ3 student documentation --- JOJ3-student-documentation.md | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 JOJ3-student-documentation.md diff --git a/JOJ3-student-documentation.md b/JOJ3-student-documentation.md new file mode 100644 index 0000000..c9709e1 --- /dev/null +++ b/JOJ3-student-documentation.md @@ -0,0 +1,41 @@ +# JOJ on gitea + +JOJ can directly be run without directly connecting to it: it suffices to commit an appropriate message to trigger testing. + +## Basic usage + +JOJ is triggered only when a commit message starts with `joj`. The second "parameter" of the commit message is the homework/task to be tested. If no other parameters are provided then all joj problems for that joj homework are tested. It is possible to test exercises individually by providing their number after the homework. + +Examples. +```bash +git commit -m"joj. h1" # test all JOJ problems for h1 +git commit -m"feat. h1e2 completed" # no JOJ tests run +git commit -m"joj. h1 2 5" # test h1 problems 2 and 5 +``` + +*Notes.* +- In case you have no file to commit, run `git commit --allow-empty -m"h1"`. +- Call JOJ on a whole assignment **only if it is complete**, otherwise only run it on the targeted exercises. Results will appear faster, and no resources will be wasted. + +## Results + +- To follow JOJ submission process connect to https://focs.ji.sjtu.edu.cn:2222 +- Check the issue tab of your repository: once JOJ has completed, an issue containing all the details opens + - It displays a link to JOJ website with all the details + - Information on the passed and failed cases + - Links to the detail for each test case + +## Faster submissions + +Add the following to your `.bashrc` +```bash +jojsubmit() { + git commit --allow-empty -m"joj. $@" ; git push +} +alias joj-submit=jojsubmit +``` + +Then submit to joj using +```bash +joj-submit "p1m1 1 3" +```