From 658c296426739105d3fb8252ffa4225847d20dbb Mon Sep 17 00:00:00 2001 From: "Hafiz, Aqib (PG/T - Comp Sci & Elec Eng)" <ah02821@surrey.ac.uk> Date: Wed, 22 May 2024 23:40:31 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d0e95c8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +stages: # List of stages for jobs, and their order of execution + - build + - test + - deploy + +build-job: # This job runs in the build stage, which runs first. + stage: build + script: + - echo "Compiling the code..." + - echo "Compile complete." + +unit-test-job: # This job runs in the test stage. + stage: test # It only starts when the job in the build stage completes successfully. + script: + - echo "Running unit tests... This will take about 60 seconds." + - echo "Code coverage is 90%" + +lint-test-job: # This job also runs in the test stage. + stage: test # It can run at the same time as unit-test-job (in parallel). + script: + - echo "Linting code... This will take about 10 seconds." + - echo "No lint issues found." + +deploy-job: # This job runs in the deploy stage. + stage: deploy # It only runs when *both* jobs in the test stage complete successfully. + environment: production + script: + - echo "Deploying application..." + - echo "Application successfully deployed." -- GitLab