Skip to content
Snippets Groups Projects

Update .gitlab-ci.yml

Merged Andri Fränkl requested to merge andri.fraenkl-main-patch-25401 into main
1 file
+ 28
7
Compare changes
  • Side-by-side
  • Inline
+ 28
7
@@ -3,12 +3,33 @@ default:
@@ -3,12 +3,33 @@ default:
- docker
- docker
image: python:3.10-slim-buster
image: python:3.10-slim-buster
my_tests:
stages: # List of employment runs, starts with build ends with deploy.
# Good to put a small description here of what this job does
- build
before_script:
- test
 
- deploy
 
 
build-job: # First stage deployment and installation of dependencies.
 
stage: build # Build Stage
 
script:
 
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- pip install -r requirements_dev.txt
 
 
Coverage-test-job: # Test Stage
 
stage: test # Starts when the above build stages finishes installing dependencies.
 
script:
 
- coverage run --source git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/ -m pytest
 
- coverage report -m
 
 
Flake8/Pylint/mypy-test-job: # Test Stage
 
stage: test # Deploys and runs all 3 linters.
 
script:
 
- flake8 --docstring-convention google git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/
 
- pylint git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/
 
- mypy git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/
 
 
deploy-job: # Deploy Stage
 
stage: deploy # Runs only when the privious jobs were finished succesfully.
 
environment: production
script:
script:
- echo "coverage run --source git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/ -m pytest"
- echo "Running script"
- echo "flake8 --docstring-convention google git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/"
- echo "Application successfully deployed."
- echo "pylint git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/"
- echo "mypy git.scicore.unibas.ch:2222/zavolan_group/tools/transcript-structure-generator/tests/"
Loading