# Grading and submission ## Local tests and grading Each assignment is shipped with two sets of tests: * The grading tests, provided as a 'black box': you can run them but are not allowed to the their content. You can run them locally (= on your computer) with the `runGradingTests` SBT command. You will get the full score **if and only if** all the grading tests pass. * The tests defined under `src/test/scala`. They can be run with the `test` SBT command and you can - we encourage you to - add your owns. We also use a Continuous Integration tool to run the grading system on the commits you push on gitlab (explained in the next section). You can see the result online (under the *CI/CD > Pipeline* section of your personal gitlab repository) and check if your code compiles and runs properly on the grading environment.  The grading pipeline contains two steps: * *compile*: your code does not compile for grading if the job fail. * *grade*: the job results in a warning if you do not get the maximum grade (10.00/10.00) You can click on the jobs to see the logs:   ## Committing and pushing your code If you've read the first few chapters of [Git book](https://git-scm.com/book/en/v2) as recommended, you must already be familiar with committing and pushing, but let's go over the basics once again: At any point while working on an assignment, you can see what changes you haven't committed by writing: ```shell git status ``` This will display the list of files you have modified since the last commit, to see the exact changes you made, run: ```shell git diff ``` To save these changes in a commit, run: (replace `"My message"` by a message describing the changes since the last commit, see [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) for some tips on writing good commit messages) ```shell git commit -am "My message" ``` You can then synchronize your local git repository with the gitlab server by running: ```shell git push -u origin my-example ``` (If you've already done this once, you can just do `git push` without arguments). Note that there are also graphical user interfaces to interact with git, for example [VSCode has built-in git support](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support). ### Submission You only have to make sure **your commits are pushed to gitlab** and that **your code is properly graded in the CI** (i.e. you get a grade): your branch will be automatically snapshotted under the `submission-$ASSIGNMENT` tag at the deadline. Note that you cannot create, delete or update the `submission-*` tags by yourself. ## Troubleshooting ### Wrong remote address ``` Cloning into 'cs206-example'... GitLab: The project you were looking for could not be found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` If you get the above message, you ever used the wrong clone URL or you recently created your account on gitlab.epfl.ch, please wait 15 minutes and try again.