Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 39c2af70 authored by Dorian Turba's avatar Dorian Turba
Browse files

gitlab ci update

parent 81e97d61
No related branches found
No related tags found
No related merge requests found
Pipeline #13415 failed
...@@ -18,9 +18,21 @@ variables: ...@@ -18,9 +18,21 @@ variables:
- source venv/bin/activate - source venv/bin/activate
- pip install .[QUALITY] - pip install .[QUALITY]
.tox_script: &tox_script .requirements_script: &requirements_script
- pip install tox - python --version # Debug
- tox -e ${CI_JOB_NAME} - python -m venv venv --upgrade-deps || python -m venv venv
- source venv/bin/activate
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git config --global user.name "${GITLAB_USER_NAME}"
- git remote set-url origin "https://:${PROJECT_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}"
- pip install .
- pip freeze > ${CI_JOB_NAME}.txt --exclude ${PACKAGE_NAME}
- git add requirements.txt
- git commit -m "Update ${CI_JOB_NAME}.txt" || true
- git fetch origin
- git rebase origin/${CI_COMMIT_BRANCH}
- git push https://:${PROJECT_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@} HEAD:"${CI_COMMIT_BRANCH}" -o ci.skip
flake8: flake8:
image: python:latest image: python:latest
...@@ -46,29 +58,47 @@ mypy: ...@@ -46,29 +58,47 @@ mypy:
script: script:
- mypy - mypy
generate_requirements: requirements_py37:
image: python:3.7 image: python:3.7
stage: test stage: requirements
script: script:
- python --version # Debug - *requirements_script
- python -m venv venv --upgrade-deps || python -m venv venv
- source venv/bin/activate requirements_py38:
- git config --global user.email "${GITLAB_USER_EMAIL}" image: python:3.8
- git config --global user.name "${GITLAB_USER_NAME}" stage: requirements
- git remote set-url origin "https://:${PROJECT_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" script:
- pip install . - *requirements_script
- pip freeze > requirements.txt --exclude ${PACKAGE_NAME}
- git add requirements.txt requirements_py39:
- git commit -m "Update requirements.txt" || true image: python:3.9
- git fetch origin stage: requirements
- git rebase origin/${CI_COMMIT_BRANCH} script:
- git push https://:${PROJECT_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@} HEAD:"${CI_COMMIT_BRANCH}" -o ci.skip - *requirements_script
requirements_py310:
image: python:3.10
stage: requirements
script:
- *requirements_script
requirements_py311:
image: python:3.11
stage: requirements
script:
- *requirements_script
requirements_py312:
image: python:3.12-rc
stage: requirements
script:
- *requirements_script
py37: py37:
image: python:3.7 image: python:3.7
stage: test stage: test
before_script: before_script:
- *install_and_generate_requirements - *install_test
script: script:
- pytest - pytest
......
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