mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-09 18:28:03 +02:00
ci: cleanup; added static device test job
This commit is contained in:
@ -23,7 +23,9 @@ include:
|
||||
#commands to run in the Docker container before starting each job.
|
||||
before_script:
|
||||
- pip install -e .[dev]
|
||||
- pip install bec-server
|
||||
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
||||
- pip install -e ./bec/bec_lib[dev]
|
||||
- pip install -e ./bec/bec_server[dev]
|
||||
|
||||
# different stages in the pipeline
|
||||
stages:
|
||||
@ -34,8 +36,11 @@ stages:
|
||||
|
||||
formatter:
|
||||
stage: Formatter
|
||||
before_script:
|
||||
- ''
|
||||
script:
|
||||
- pip install black isort
|
||||
- pip install -e .[dev]
|
||||
- isort --check --diff ./
|
||||
- black --check --diff --color ./
|
||||
|
||||
@ -43,7 +48,6 @@ pylint:
|
||||
stage: Formatter
|
||||
script:
|
||||
- pip install pylint pylint-exit anybadge
|
||||
- pip install -e .[dev]
|
||||
- mkdir ./pylint
|
||||
- pylint ./ophyd_devices --output-format=text --output=./pylint/pylint.log | tee ./pylint/pylint.log || pylint-exit $?
|
||||
- PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
|
||||
@ -92,8 +96,6 @@ secret_detection:
|
||||
pytest:
|
||||
stage: test
|
||||
script:
|
||||
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
||||
- pip install -e ./bec/bec_lib[dev]
|
||||
- pip install coverage
|
||||
- coverage run --source=./ophyd_devices -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests
|
||||
- coverage report
|
||||
@ -106,6 +108,17 @@ pytest:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
|
||||
config_test:
|
||||
stage: test
|
||||
script:
|
||||
- ophyd_test --config ./ophyd_devices/epics/db/ --output ./config_tests
|
||||
artifacts:
|
||||
paths:
|
||||
- ./config_tests
|
||||
when: on_failure
|
||||
expire_in: "30 days"
|
||||
allow_failure: true
|
||||
|
||||
tests-3.11:
|
||||
stage: AdditionalTests
|
||||
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11
|
||||
|
@ -10,11 +10,6 @@ from bec_lib.scibec_validator import SciBecValidator
|
||||
|
||||
from ophyd_devices.utils.bec_device_base import BECDevice
|
||||
|
||||
try:
|
||||
from bec_plugins import devices as plugin_devices
|
||||
except ImportError:
|
||||
plugin_devices = None
|
||||
|
||||
try:
|
||||
from bec_server.device_server.devices.devicemanager import DeviceManagerDS as device_manager
|
||||
except ImportError:
|
||||
|
Reference in New Issue
Block a user