Skip to content
Snippets Groups Projects
Commit 1881eae6 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] enhance .gitlab-ci.yml and Makefile

Remove tests (not ready yet)
Add PyPI-test release
parent ac8bf977
No related branches found
No related tags found
1 merge request!7750.50.0
stages: stages:
- github-sync - github-sync
- build_and_test - build
- release - release
variables: variables:
...@@ -8,7 +8,7 @@ variables: ...@@ -8,7 +8,7 @@ variables:
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.7 image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.7
push_to_github: .push_to_github:
stage: github-sync stage: github-sync
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
...@@ -26,7 +26,7 @@ push_to_github: ...@@ -26,7 +26,7 @@ push_to_github:
- mv packed-refs-new packed-refs - mv packed-refs-new packed-refs
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?" - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.env: &env .env:
tags: tags:
- redshift-docker-python - redshift-docker-python
before_script: before_script:
...@@ -37,28 +37,48 @@ push_to_github: ...@@ -37,28 +37,48 @@ push_to_github:
- export PATH=/opt/qt/5.9/5.9.4/gcc_64/bin:$PATH - export PATH=/opt/qt/5.9/5.9.4/gcc_64/bin:$PATH
- export DISPLAY=:99 - export DISPLAY=:99
.changes:
only:
changes:
- sakia/**/*.py
- .gitlab-ci.yml
- Makefile
- requirements_dev.txt
- requirements.txt
- setup.py
- tests/**/*.py
build_and_test: &build_and_test build:
<<: *env extends:
stage: build_and_test - .env
- .changes
stage: build
script: script:
- pip install wheel
- pip install pytest-cov
- pip install -r requirements.txt - pip install -r requirements.txt
- python gen_resources.py - pip install -r requirements_deploy.txt
- python gen_translations.py --lrelease - make build
- python setup.py bdist_wheel
- py.test --cov=sakia tests/
releases: release:
<<: *env extends:
- .env
- .push_to_github
stage: release stage: release
when: manual when: manual
script: script:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install wheel - pip install -r requirements_deploy.txt
- pip install twine - make build
- python gen_resources.py - make deploy PYPI_LOGIN=${PYPI_LOGIN} PYPI_PASSWORD=${PYPI_PASSWORD}
- python gen_translations.py --lrelease only:
- python setup.py bdist_wheel - tags
- twine upload dist/* --username duniter --password $PYPI_PASSWORD - master
release_test:
extends: .env
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD}
...@@ -32,7 +32,9 @@ format: ...@@ -32,7 +32,9 @@ format:
build: build:
if [ -d "./build" ]; then rm -r build/*; fi if [ -d "./build" ]; then rm -r build/*; fi
if [ -d "./dist" ]; then rm -r dist/*; fi if [ -d "./dist" ]; then rm -r dist/*; fi
python setup.py sdist bdist_wheel python3 gen_resources.py
python3 gen_translations.py --lrelease
python3 setup.py sdist bdist_wheel
# upload on PyPi repository # upload on PyPi repository
deploy: deploy:
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment