diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ab04c30..dd8178d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,7 @@ stages: - downloads + - configure - test - build - package @@ -59,12 +60,12 @@ dl-mage-windows: - mage-windows/mage_extraire.exe - mage-windows/mailleurPF.exe -######### -# BUILD # -######### +############# +# CONFIGURE # +############# set-version: - stage: build + stage: configure tags: - linux script: @@ -75,7 +76,7 @@ set-version: - VERSION build-lang: - stage: build + stage: configure tags: - linux script: @@ -85,6 +86,49 @@ build-lang: paths: - src/lang/*.qm +######### +# TESTS # +######### + +unittest: + stage: test + tags: + - linux + needs: + - job: set-version + artifacts: true + script: + - python3 -m venv venv + - . venv/bin/activate + - pip3 install -U pip + - pip3 install -r ./full-requirements.txt + - pip3 install -U -r ./full-requirements.txt + - cd src + - python3 -m unittest discover -t . + +test-pep8: + stage: test + tags: + - linux + needs: + - job: set-version + artifacts: true + - job: unittest + script: + # Setup virtual env + - python3 -m venv venv + - . venv/bin/activate + - pip3 install -U pip + - pip3 install -r ./requirements.txt + - pip3 install -U -r ./requirements.txt + - pip3 install pycodestyle + - pycodestyle ./src + allow_failure: true + +######### +# BUILD # +######### + build-users-doc: stage: build tags: @@ -242,45 +286,6 @@ build-windows: paths: - windows/pamhyr -######### -# TESTS # -######### - -unittest: - stage: test - tags: - - linux - needs: - - job: set-version - artifacts: true - script: - - python3 -m venv venv - - . venv/bin/activate - - pip3 install -U pip - - pip3 install -r ./full-requirements.txt - - pip3 install -U -r ./full-requirements.txt - - cd src - - python3 -m unittest discover -t . - -test-pep8: - stage: test - tags: - - linux - needs: - - job: set-version - artifacts: true - - job: unittest - script: - # Setup virtual env - - python3 -m venv venv - - . venv/bin/activate - - pip3 install -U pip - - pip3 install -r ./requirements.txt - - pip3 install -U -r ./requirements.txt - - pip3 install pycodestyle - - pycodestyle ./src - allow_failure: true - ############ # PACKAGES # ############