diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4bbc1e0d0ccd6916c4175d0d9404b9779b80eff3..9152b0e5376f26c15838a22af5c6a66ff9c9e953 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,9 @@ before_script: stages: - test - linting - - deploy + - build + - publish + - pages # The YAML file defines a set of jobs with constraints stating when they should be run. # You can specify an unlimited number of jobs which are defined as top-level elements with an arbitrary name and always @@ -66,8 +68,40 @@ linting: paths: - ./build +build_dev_package: + stage: build + tags: + - docker-executor + script: + - python3 setup.py egg_info -b+dev.$CI_COMMIT_SHORT_SHA sdist bdist_wheel + artifacts: + path: + - ./dist + +build_package: + stage: build + tags: + - docker-executor + script: + - python setup.py egg_info -b.$CI_COMMIT_SHORT_SHA sdist bdist_wheel + only: [master] + artifacts: + path: + - ./dist + +publish: + stage: publish + tags: + - docker-executor + variables: + TWINE_USERNAME: $TWINE_USERNAME + TWINE_PASSWORD: $TWINE_PASSWORD + script: + - pip3 install twine + - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* + pages: - stage: deploy + stage: pages tags: - docker-executor dependencies: diff --git a/tests/test_se_master.py b/tests/test_se_master.py index f24cffd019832615a8d1de33967bd4ed4094f988..e18d5d2c4e53229d3f8234eafba35874a85d3186 100644 --- a/tests/test_se_master.py +++ b/tests/test_se_master.py @@ -155,7 +155,6 @@ class TestCspSubElementMaster(object): # reinitialize the device to return to # adminMode =ONLINE and State=INIT tango_context.device.Init() - time.sleep(2) assert tango_context.device.adminMode == AdminMode.ONLINE assert tango_context.device.State() == DevState.INIT with pytest.raises(DevFailed) as df: @@ -257,8 +256,6 @@ class TestCspSubElementMaster(object): tango_context.device.onCmdDurationExpected = 20 tango_context.device.offCmdDurationExpected = 20 tango_context.device.standbyCmdDurationExpected = 20 - # wait to let the polling thread update the attrs value - time.sleep(3) assert tango_context.device.onCmdDurationExpected == 20 assert tango_context.device.offCmdDurationExpected == 20 assert tango_context.device.standbyCmdDurationExpected == 20 diff --git a/tests/test_se_subarray.py b/tests/test_se_subarray.py index 786d2d7f5b3dc00d32a163ca35845a5072653b71..985b2b6bf15fd89b1a4c6e6702db2eec82c45fff 100644 --- a/tests/test_se_subarray.py +++ b/tests/test_se_subarray.py @@ -190,8 +190,6 @@ class TestCspSubElementSubarray(object): def test_set_command_duration_expected(self, tango_context): """Test xxxCmdDurationExpected attributes""" tango_context.device.goToIdleDurationExpected = 20 - # wait to let the polling thread update the attrs value - time.sleep(3) assert tango_context.device.goToIdleDurationExpected == 20