20 lines
490 B
YAML
20 lines
490 B
YAML
image: "python:3.7" #commands to run in the Docker container before starting each job.
|
|
before_script:
|
|
- python --version
|
|
- pip install -r requirements.txt # different stages in the pipeline
|
|
stages:
|
|
- linting
|
|
- testing
|
|
pylint:
|
|
stage: linting
|
|
image: registry.gitlab.com/mafda/python-linting
|
|
script:
|
|
- find . -type f -name "*.py" | xargs pylint
|
|
only:
|
|
- merge_requests
|
|
testing:
|
|
image: "python:latest"
|
|
stage: testing
|
|
script:
|
|
- pip install pytest
|
|
- pytest -v |