diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 791b7eac7a9550a98404527ce96be315bf82b7ac..1482ffb1d08624a1dfbf61925c9e82207b878a4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,12 @@ stages: - github-sync - - prepare - - build - - test + - build_and_test - release variables: PYENV_PYTHON_VERSION: 3.5.5 -image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.5 +image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.7 push_to_github: stage: github-sync @@ -28,7 +26,7 @@ push_to_github: - mv packed-refs-new packed-refs - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?" -.pyenv: &pyenv +.env: &env tags: - redshift-docker-python before_script: @@ -36,39 +34,29 @@ push_to_github: - export PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" - pyenv shell $PYENV_PYTHON_VERSION + - export PATH=/opt/qt/5.9/5.9.4/gcc_64/bin:$PATH + - export DISPLAY=:99 -.qt5: &qt5 - tags: - - redshift-docker-python - before_script: - - export PATH=/opt/qt/5.9/5.9/gcc_64/bin:$PATH -build: &build - <<: *pyenv - stage: build - script: - - pip install -r requirements.txt - - python gen_resources.py - - python gen_translations.py --lrelease - - python setup.py sdist bdist_wheel - - py.test -test: - <<: *pyenv - stage: test +build_and_test: &build_and_test + <<: *env + stage: build_and_test script: - - pip install coveralls + - pip install wheel + - pip install pytest-cov - pip install -r requirements.txt - python gen_resources.py - python gen_translations.py --lrelease + - python setup.py bdist_wheel - py.test --cov=sakia tests/ releases: - <<: *pyenv + <<: *env stage: release when: manual script: - pip install -r requirements.txt - pip install wheel - pip install twine - - python setup.py sdist bdist_wheel + - python setup.py bdist_wheel - twine upload dist/* --username duniter --password $PYPI_PASSWORD diff --git a/README.md b/README.md index 37ef60117e11c5682c48354c4fd76cf0c0c2a37c..1c363a2615fea2ad3a714de5fe3993545c076f34 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,10 @@  # Sakia -[](https://coveralls.io/r/duniter/sakia) + [](https://git.duniter.org/clients/python/sakia/commits/gitlab) + [](https://git.duniter.org/clients/python/sakia/commits/gitlab) [](https://travis-ci.org/duniter/sakia) [](https://ci.appveyor.com/project/Insoleet/sakia-bee4m/branch/dev) - [](http://weblate.duniter.org/engage/sakia/?utm_source=widget) - [](https://www.quantifiedcode.com/app/project/3fff212226eb4027a586bc32e32d909b) ======== diff --git a/ci/travis/before_install.sh b/ci/travis/before_install.sh index 5b4abc3581f91ed9687f4277d5a378b742d29a08..c0d85bff821f4ab074f0d0bb3f426bdd2a15c960 100755 --- a/ci/travis/before_install.sh +++ b/ci/travis/before_install.sh @@ -29,7 +29,7 @@ then dbus-x11 wget https://download.qt.io/official_releases/qt/5.9/5.9.4/qt-opensource-linux-x64-5.9.4.run chmod +x qt-opensource-linux-x64-5.9.4.run - ./qt-opensource-linux-x64-5.9.4.run --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs + ./qt-opensource-linux-x64-5.9.4.run -v --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs wget http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsodium/libsodium18_1.0.13-1_amd64.deb sudo dpkg -i libsodium18_1.0.13-1_amd64.deb diff --git a/ci/travis/qt-installer-noninteractive.qs b/ci/travis/qt-installer-noninteractive.qs index 148160f71e3dce61607e5fa5153947bc5a874a11..6d52662166b4361ccbee22081c4838643ba4ae2f 100644 --- a/ci/travis/qt-installer-noninteractive.qs +++ b/ci/travis/qt-installer-noninteractive.qs @@ -26,9 +26,9 @@ Controller.prototype.TargetDirectoryPageCallback = function() } Controller.prototype.ComponentSelectionPageCallback = function() { - //var widget = gui.currentPageWidget(); + var widget = gui.currentPageWidget(); - //widget.selectAll(); + widget.selectAll(); gui.clickButton(buttons.NextButton); } diff --git a/src/sakia/constants.py b/src/sakia/constants.py index c1ad2befb4a8f09d84f1644608f495c4ad9ac098..d5c59565d934ded0ecd9004201e8acaa76bd92c0 100644 --- a/src/sakia/constants.py +++ b/src/sakia/constants.py @@ -3,8 +3,8 @@ import yaml MAX_CONFIRMATIONS = 6 -with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r') as stream: +with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r', encoding="utf-8") as stream: ROOT_SERVERS = yaml.load(stream) -with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r') as stream: +with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r', encoding="utf-8") as stream: G1_LICENCE = stream.read() diff --git a/src/sakia/main.py b/src/sakia/main.py index 82b4293652418e2eeb40a32e6db283f72ff560d9..187e850fc6f0340824d6245a16f77c6de0512e38 100755 --- a/src/sakia/main.py +++ b/src/sakia/main.py @@ -1,3 +1,4 @@ +import locale import asyncio import logging import signal diff --git a/tests/conftest.py b/tests/conftest.py index c515342361e8d306c0d4b6a75c0e04844e419304..c3df0702163faf08387d043ef02c2477a6c7eb85 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,6 +5,7 @@ import sqlite3 import mirage import sys import os +import locale sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))) @@ -20,7 +21,6 @@ from sakia.services import DocumentsService _application_ = [] - @pytest.yield_fixture def event_loop(): qapplication = get_application()