Add [TA] JOJ preparation and testing process

manuel 2025-09-27 08:08:40 +08:00
parent ae1fbf41e3
commit 5bdb24208d

@ -0,0 +1,59 @@
# JOJ preparation and testing process
## Preparation
**Important.** Never release or make JOJ available before it has been fully tested.
## Testing
The first time JOJ is setup, make sure to run extensive tests in a separate test repository. When all tests are successful , create an orphan branch in `course-joj` with name `test-repoName`, where `repoName` corresponds to the name of the repository used by students. This new orphan branch must have the exact same structure as the repository used by students. For instance, if students have a `homework` repository, then call the branch `test-homework` and its content should have the exact same structure as the `homework` repository, e.g. one directory per homework with similar filenames, etc..
## Known issues
### Gitea actions and LFS
Bug: https://github.com/actions/checkout/issues/1830#issuecomment-2314758792
Solution: adjust the YAML workflow fot checkout LFS object separately.
<details><summary>Sample YAML worklow file.</summary>
```yaml
name: Run JOJ3 on Push
on: [push]
jobs:
run:
runs-on: focs-ubuntu-latest-slim
container:
volumes:
- /home/tt/.config:/home/tt/.config
- /home/tt/.cache:/home/tt/.cache
- /home/tt/.ssh:/home/tt/.ssh
steps:
- name: Check out repository code
uses: actions/checkout@focs
with:
lfs: false
persist-credentials: 'true'
- name: Checkout lfs
run: |
git lfs install --local
AUTH=$(git config --local http.https://focs.ji.sjtu.edu.cn/.extraheader)
git config --local --unset http.https://focs.ji.sjtu.edu.cn/.extraheader
git config --local http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
git lfs pull
- name: run joj3
run: |
sudo -E -u tt joj3 -conf-root /home/tt/.config/joj
```
</details>
### Memory sanitizer