mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-13 12:11:51 +02:00
Update .gitlab-ci.yml
This commit is contained in:
@ -59,13 +59,14 @@ load_vars:
|
|||||||
stage: pre
|
stage: pre
|
||||||
script:
|
script:
|
||||||
- echo "Loading variables from vars.yml..."
|
- echo "Loading variables from vars.yml..."
|
||||||
- cat /ci/vars.env >> build.env
|
- cat /ci/my_branch.env >> build.env
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
dotenv: build.env
|
dotenv: build.env
|
||||||
|
|
||||||
formatter:
|
formatter:
|
||||||
stage: Formatter
|
stage: Formatter
|
||||||
|
needs: ["load_vars"]
|
||||||
before_script:
|
before_script:
|
||||||
- ""
|
- ""
|
||||||
script:
|
script:
|
||||||
@ -79,6 +80,7 @@ formatter:
|
|||||||
|
|
||||||
pylint:
|
pylint:
|
||||||
stage: Formatter
|
stage: Formatter
|
||||||
|
needs: ["load_vars"]
|
||||||
script:
|
script:
|
||||||
- pip install pylint pylint-exit anybadge
|
- pip install pylint pylint-exit anybadge
|
||||||
- mkdir ./pylint
|
- mkdir ./pylint
|
||||||
@ -96,7 +98,7 @@ pylint:
|
|||||||
|
|
||||||
pylint-check:
|
pylint-check:
|
||||||
stage: Formatter
|
stage: Formatter
|
||||||
needs: []
|
needs: ["load_vars"]
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
before_script:
|
before_script:
|
||||||
- pip install pylint pylint-exit anybadge
|
- pip install pylint pylint-exit anybadge
|
||||||
@ -137,6 +139,7 @@ secret_detection:
|
|||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
stage: test
|
stage: test
|
||||||
|
needs: ["load_vars"]
|
||||||
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
|
||||||
@ -153,6 +156,7 @@ pytest:
|
|||||||
|
|
||||||
config_test:
|
config_test:
|
||||||
stage: test
|
stage: test
|
||||||
|
needs: ["load_vars"]
|
||||||
script:
|
script:
|
||||||
- ophyd_test --config ./ophyd_devices/configs/ --output ./config_tests
|
- ophyd_test --config ./ophyd_devices/configs/ --output ./config_tests
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -169,6 +173,7 @@ tests-3.11:
|
|||||||
optional: true
|
optional: true
|
||||||
- job: "pylint"
|
- job: "pylint"
|
||||||
optional: true
|
optional: true
|
||||||
|
- job: "load_vars"
|
||||||
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11
|
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11
|
||||||
script:
|
script:
|
||||||
- pytest -v --random-order ./tests
|
- pytest -v --random-order ./tests
|
||||||
@ -182,6 +187,7 @@ tests-3.12:
|
|||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
trigger_bec:
|
trigger_bec:
|
||||||
|
needs: ["load_vars"]
|
||||||
trigger:
|
trigger:
|
||||||
project: bec/bec
|
project: bec/bec
|
||||||
strategy: depend
|
strategy: depend
|
||||||
@ -205,7 +211,7 @@ trigger:
|
|||||||
- CHILD_PROJECT: xtreme_bec
|
- CHILD_PROJECT: xtreme_bec
|
||||||
CHILD_PIPELINE_BRANCH: $XTREME_BEC_BRANCH
|
CHILD_PIPELINE_BRANCH: $XTREME_BEC_BRANCH
|
||||||
|
|
||||||
needs: []
|
needs: ["load_vars"]
|
||||||
trigger:
|
trigger:
|
||||||
strategy: depend
|
strategy: depend
|
||||||
include:
|
include:
|
||||||
@ -225,7 +231,7 @@ trigger:
|
|||||||
|
|
||||||
semver:
|
semver:
|
||||||
stage: Deploy
|
stage: Deploy
|
||||||
needs: ["pytest"]
|
needs: ["pytest", "load_vars"]
|
||||||
script:
|
script:
|
||||||
- git config --global user.name "ci_update_bot"
|
- git config --global user.name "ci_update_bot"
|
||||||
- git config --global user.email "ci_update_bot@bec.ch"
|
- git config --global user.email "ci_update_bot@bec.ch"
|
||||||
|
Reference in New Issue
Block a user