adding codequality
This commit is contained in:
parent
9a524ce7c9
commit
8643764aa3
2 changed files with 24 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
linux_source_package:
|
linux_source_package:
|
||||||
|
@ -35,6 +36,7 @@ linux_source_package:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get -y upgrade
|
||||||
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
||||||
|
# Action
|
||||||
- make sdist
|
- make sdist
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-src"
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-src"
|
||||||
|
@ -51,6 +53,7 @@ linux_package:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get -y upgrade
|
||||||
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
||||||
|
# Action
|
||||||
- make bdist
|
- make bdist
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package"
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package"
|
||||||
|
@ -67,6 +70,7 @@ linux_package_wheel:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get -y upgrade
|
||||||
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
||||||
|
# Action
|
||||||
- python3 setup.py bdist_wheel --universal
|
- python3 setup.py bdist_wheel --universal
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-whl"
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-whl"
|
||||||
|
@ -74,6 +78,7 @@ linux_package_wheel:
|
||||||
- dist
|
- dist
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
|
## Test
|
||||||
linux_test:
|
linux_test:
|
||||||
stage: test
|
stage: test
|
||||||
tags:
|
tags:
|
||||||
|
@ -83,7 +88,8 @@ linux_test:
|
||||||
# Prepare environment
|
# Prepare environment
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get -y upgrade
|
||||||
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
||||||
|
# Action
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
linux_coverage:
|
linux_coverage:
|
||||||
|
@ -96,6 +102,22 @@ linux_coverage:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get -y upgrade
|
||||||
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
- apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel
|
||||||
|
# Action
|
||||||
- make coverage
|
- make coverage
|
||||||
|
|
||||||
|
codequality:
|
||||||
|
image: docker:latest
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
script:
|
||||||
|
- docker pull codeclimate/codeclimate
|
||||||
|
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 init
|
||||||
|
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 analyze -f json > codeclimate.json || true
|
||||||
|
artifacts:
|
||||||
|
paths: [codeclimate.json]
|
||||||
|
|
||||||
|
|
||||||
|
## Deploy
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,8 @@ https://khaganat.net/wikhan/fr:collabo_pymanager
|
||||||
|
|
||||||
|
|
||||||
[![pipeline status](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/badges/develop/pipeline.svg)](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/commits/develop)
|
[![pipeline status](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/badges/develop/pipeline.svg)](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/commits/develop)
|
||||||
|
|
||||||
[![coverage report](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/badges/develop/coverage.svg)](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/commits/develop)
|
[![coverage report](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/badges/develop/coverage.svg)](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/commits/develop)
|
||||||
|
[![Code Climate](https://git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/badges/develop/gpa.svg)](git.khaganat.net/khaganat/mmorpg_khanat/opennel-pymanager/commits/develop)
|
||||||
|
|
||||||
Prepare our environment
|
Prepare our environment
|
||||||
=======================
|
=======================
|
||||||
|
|
Loading…
Reference in a new issue