-
Olivier Levillain authoredOlivier Levillain authored
README.md 1.94 KiB
Third git exercise (c flavor)
In this series of exercises, we assume you are working as a team of two: one of you is acting as a developer, the other as the project maintainer.
To validate this exercise, you have to perform the following actions:
- [Maintainer] fork the project
- [Maintainer] enforce that only maintainers can merge into the main branch
- [Maintainer] enforce that no one can directly push into the main branch
- [Maintainer] invite your teammate as a developer on the project
- [Maintainer] also invite your teacher as a developer
- [Developer] Clone the repository
- [Developer] Identify the problem with this project and write an issue about it
- [Developer] Create a dedicated branch to fix the problem
- [Developer] Once you are happy with your work, propose a Merge Request
- [Maintainer] Review the proposal, and comment if need be
- [Developer] Improve your review following the maintainer's commnets
- [Maintainer] When the Merge Request seems acceptable, accept it into the main branch
If you have already validated this exercise and a similar one, both as developer and as maintainer, here are some follow-up questions, to do with your teammate:
- [Maintainer] Add a .gitlab-ci.yml file at the root of the project, with the following content, with IMAGE being gcc for a C program or python:3.10 for python scripts (and push it into the main branch)
test:
image: IMAGE
script:
- make check
- [Maintainer] Configure the repository so that a Merge Request can
only be accepted if the CI pipeline (the
make check
above) succeeds. - [Maintainer] Look at the CI/CD Runners options and give the teacher the information needed to set up a runner
- [Developer] Write a Makefile and some tests in a dedicated branch
- [Developer] Once you are satisfied, fill a Merge Request
- [Maintainer] Try and validate the Merge Request. If it does not work, discuss with your dev.