Hands-on task
GitLab CI: two stages
The project app (cloned to /root/app, the web sign-in is on the GitLab tab) has an app.py module with tests, but no CI. A runner is already connected to the project.
Write a .gitlab-ci.yml with two stages: build, then test, and one job per stage. The build stage's job checks that the code compiles: python3 -m py_compile app.py. The test stage's job runs the tests: python3 -m unittest -v.
Push to main and get a green pipeline. In the GitLab web UI, watch the stages run one after another.
- gitlab ci
- stages
- yaml pipeline
- job and script
- stage order
- pipeline