diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..b857d9904 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,9 @@ +[run] + +source= + source/rafcon + +omit = + *__init__* + */usr/local/lib* + */test* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4cdf577d0..8b9e8ea54 100644 --- a/.gitignore +++ b/.gitignore @@ -50,11 +50,13 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ +htmlcov_core/ .tox/ .coverage .cache nosetests.xml coverage.xml +coverage_core.xml # Translations *.mo diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..835b26711 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,108 @@ +include: + - project: 'dev/sys/sopl/ar-dev' + # release branch + ref: 'release/3.x' + file: + - '/ci/templates/default.yml' + +variables: + AR_CI_CLANG_FORMAT_DISABLE: "true" + AR_CI_CLANG_TIDY_DISABLE: "true" + AR_CI_CPPCHECK_DISABLE: "true" + AR_CI_FLAKE8_DISABLE: "true" + AR_CI_YAPF_DISABLE: "true" + AR_CI_DOCS_DISABLE: "false" + AR_CI_DEPLOY_CONAN_DISABLE: "true" + +# From https://docs.gitlab.com/ee/ci/merge_request_pipelines/#excluding-certain-jobs +.only-default: &only-default + only: + # only: [branches, tags] is the default + # extend it by merge_reguests + # and limit branches to master and release/* + # See also: https://docs.gitlab.com/ee/ci/yaml/#onlyexcept-basic + - master + - develop + - /^release/.*$ + - /^release.*$ + - tags + - merge_requests + +docs_test: + extends: .docs_test + variables: + BUILD_DIR: build + CONAN_OPTIONS: "" + MAKE_CMD_DOCS: "make docs" + +pages: + extends: .docs_pages + variables: + BUILD_DIR: build + CONAN_OPTIONS: "" + MAKE_CMD_DOCS: "make docs" + except: + variables: + - $AR_CI_DOCS_DISABLE == "true" + +test py2-tests: + <<: *only-default + stage: Test + tags: + - Agile_GUI_Docker + script: + - pip2 install --user --force "pytest>=3.5,<5" lazy-object-proxy==1.5.0 PyYAML==5.1 yaml-configuration==0.2.5 + - pip2 install pytest-runner==5.2 # this is py2 compatible, ver 5.3 is not + - xvfb-run -as "-screen 0 1920x1200x24" python2 setup.py pytest --addopts '-vx -m "(core or gui) and not unstable and not user_input"' + +test py3-tests: + <<: *only-default + stage: Test + tags: + - Agile_GUI_Docker + script: + - pip3 install tox + - xvfb-run -as "-screen 0 1920x1200x24" tox -r -c tox_external.ini -e py36 + coverage: /^TOTAL.+?(\d+\%)$/ + artifacts: + expire_in: 7 days + reports: + cobertura: coverage.xml + paths: + - coverage.xml + - htmlcov/* + +test py3-tests-core: + <<: *only-default + stage: Test + tags: + - Agile_GUI_Docker + script: + - pip3 install tox + - xvfb-run -as "-screen 0 1920x1200x24" tox -r -c tox_external.ini -e core + coverage: /^TOTAL.+?(\d+\%)$/ + artifacts: + expire_in: 7 days + reports: + cobertura: coverage_core.xml + paths: + - coverage_core.xml + - htmlcov_core/* + + +test py3-memory-test-core: + <<: *only-default + stage: Test + tags: + - Agile_GUI_Docker + script: + - pip3 install tox + - xvfb-run -as "-screen 0 1920x1200x24" tox -r -c tox_external.ini -e memory_core + artifacts: + expire_in: 7 days + + +# running pytest directly does not work +# as the test_start_script.py test_start_script_valid_config always uses "python" to start "rafcon_core" +# which fails if tests are run using python3 as the "python" always maps to python2 on Ubuntu 18.04 +# - xvfb-run -as "-screen 0 1920x1200x24" python3 setup.py pytest --addopts '-vx -m "(core or gui) and not unstable and not user_input"' diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml index 69987b2fa..105ce2da2 100644 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/.idea/runConfigurations/Start_GUI.xml b/.idea/runConfigurations/Start_GUI.xml index d81f909d5..c34150791 100644 --- a/.idea/runConfigurations/Start_GUI.xml +++ b/.idea/runConfigurations/Start_GUI.xml @@ -6,7 +6,7 @@ -