CI-CD config

This commit is contained in:
Scott Wallace 2021-12-29 13:29:22 +00:00
parent dbedad5189
commit ed751e8aec
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -13,27 +13,27 @@
# #
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages # For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- test - test
- build - build
build-job: # This job runs in the build stage, which runs first. build-job: # This job runs in the build stage, which runs first.
stage: build stage: build
script: script:
- echo "Building the Docker image..." - echo "Building the Docker image..."
- docker-compose build - docker-compose build
- echo "Build complete." - echo "Build complete."
unit-test-job: # This job runs in the test stage. unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully. stage: test # It only starts when the job in the build stage completes successfully.
script: script:
- echo "Running unit tests..." - echo "Running unit tests..."
- python3 -munittest discover - python3 -munittest discover
- echo "Testing complete" - echo "Testing complete"
lint-test-job: # This job also runs in the test stage. 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). stage: test # It can run at the same time as unit-test-job (in parallel).
script: script:
- echo "Linting code..." - echo "Linting code..."
- pylint - pylint .
- echo "No lint issues found." - echo "No lint issues found."