X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=.gitlab-ci.yml;h=195423eef5542b2da4108e14bfb2b61a304ccb6f;hb=799caf7d8e01cf9a10857bda5738fe98afd3902e;hp=2b204856a82e75e18f958ad4a77a79dbf774077a;hpb=359532cc2fb968a133aa4265b7202998eda0978f;p=mpd-sima.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b20485..195423e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,12 @@ # Official language image. Look for the different tagged releases at: -# https://hub.docker.com/r/library/python/ +# https://hub.docker.com/_/python image: python:3 +include: + - local: .gitlab/gitlab-templates.yml + - local: .gitlab/pylint.yml + - template: Security/SAST.gitlab-ci.yml + variables: #XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache" @@ -14,29 +19,61 @@ stages: - test - build -test: +smoketest: stage: test script: - - pip install pytest-cov requests - - py.test -q --cov=sima tests + - pip install requests python-musicpd sphinx - python setup.py test # build wheel and source - python setup.py bdist_wheel sdist + # manual and HTML documentation + - python setup.py build_sphinx # install - pip install dist/*.whl # smoke test - mpd-sima --help + - TRACE=y ./mpd-sima -d --pid ./mpd-sima.pid -l ./mpd-sima.log + - sleep 10 + - test -f ./mpd-sima.pid && kill $(cat ./mpd-sima.pid) artifacts: expire_in: 1 hour paths: - dist/*.whl - dist/*.tar.gz - dist/*.zip + - ./mpd-sima.pid + - ./mpd-sima.log + +unittests: + stage: test + script: + - pip install pytest-cov requests python-musicpd + - py.test -q --cov=sima --junitxml=report.xml tests + artifacts: + when: always + reports: + junit: report.xml + +vinstall: + stage: test + script: + # test virtualenv install + - python3 ./vinstall.py + # smoke test + - ./vmpd-sima --help + artifacts: + expire_in: 1 hour + +sast: + variables: + SAST_EXCLUDED_ANALYZERS: brakeman, eslint, flawfinder, gosec, kubesec, nodejs-scan, + phpcs-security-audit, pmd-apex, security-code-scan, semgrep, sobelow, spotbugs + stage: test tag_release: stage: build dependencies: - - test + - smoketest script: - python -V artifacts: