mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-04 08:14:49 +02:00
ci: added security detection
This commit is contained in:
@ -3,6 +3,17 @@
|
|||||||
# https://hub.docker.com/r/library/python/tags/
|
# https://hub.docker.com/r/library/python/tags/
|
||||||
image: $CI_DOCKER_REGISTRY/python:3.9
|
image: $CI_DOCKER_REGISTRY/python:3.9
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH
|
||||||
|
|
||||||
|
include:
|
||||||
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||||
|
|
||||||
|
|
||||||
#commands to run in the Docker container before starting each job.
|
#commands to run in the Docker container before starting each job.
|
||||||
before_script:
|
before_script:
|
||||||
- pip install -e .[dev]
|
- pip install -e .[dev]
|
||||||
@ -11,7 +22,7 @@ before_script:
|
|||||||
# different stages in the pipeline
|
# different stages in the pipeline
|
||||||
stages:
|
stages:
|
||||||
- Formatter
|
- Formatter
|
||||||
- Test
|
- test # must be called test for security/secret-detection to work
|
||||||
- AdditionalTests
|
- AdditionalTests
|
||||||
- Deploy
|
- Deploy
|
||||||
|
|
||||||
@ -70,7 +81,7 @@ pylint-check:
|
|||||||
|
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
stage: Test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install coverage
|
- pip install coverage
|
||||||
- coverage run --source=./ophyd_devices -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests
|
- coverage run --source=./ophyd_devices -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests
|
||||||
|
Reference in New Issue
Block a user