adding codequality

This commit is contained in:
AleaJactaEst 2018-02-08 00:39:40 +01:00
parent 9a524ce7c9
commit 8643764aa3
2 changed files with 24 additions and 3 deletions

View file

@ -23,6 +23,7 @@
stages:
- build
- test
- deploy
## Build
linux_source_package:
@ -35,6 +36,7 @@ linux_source_package:
- apt-get update
- 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
# Action
- make sdist
artifacts:
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 -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
# Action
- make bdist
artifacts:
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 -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
# Action
- python3 setup.py bdist_wheel --universal
artifacts:
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-whl"
@ -74,6 +78,7 @@ linux_package_wheel:
- dist
expire_in: 1 week
## Test
linux_test:
stage: test
tags:
@ -83,7 +88,8 @@ linux_test:
# Prepare environment
- apt-get update
- 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
linux_coverage:
@ -96,6 +102,22 @@ linux_coverage:
- apt-get update
- 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
# Action
- 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

View file

@ -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)
[![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
=======================