Update .gitlab-ci.yml file

This commit is contained in:
Late Night Defender 2023-07-30 17:10:01 +00:00
parent 9b335ef7f8
commit baecb2a465

View file

@ -1,27 +1,24 @@
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- prepare
- build - build
- test
- deploy - deploy
build-job: # This job runs in the build stage, which runs first. remove-old-services: # This job runs in the build stage, which runs first.
stage: build stage: prepare
script: script:
- echo "Compiling the code..." - podman stop little-lines
- echo "Compile complete." - podman rm little-lines
unit-test-job: # This job runs in the test stage. apply-version-tag:
stage: test # It only starts when the job in the build stage completes successfully. stage: prepare
script: script:
- echo "Running unit tests... This will take about 60 seconds." - sed -i "s/DATE/$(date -I)/g" src/views/Setting.vue
- sleep 60 - sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" src/views/Setting.vue
- echo "Code coverage is 90%"
lint-test-job: # This job also runs in the test stage. build-job: # This job runs in the test stage.
stage: test # It can run at the same time as unit-test-job (in parallel). stage: build # It only starts when the job in the build stage completes successfully.
script: script:
- echo "Linting code... This will take about 10 seconds." - podman build -t little-lines:$(git log -1 --oneline | awk '{print $1}') .
- sleep 10
- echo "No lint issues found."
deploy-job: # This job runs in the deploy stage. deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully. stage: deploy # It only runs when *both* jobs in the test stage complete successfully.