This commit is contained in:
Sylvain LE GAL 2022-05-30 14:02:57 +02:00
parent 0aa9f8bf36
commit 3ab09ff20d

View File

@ -1,4 +1,4 @@
image: docker:latest image: docker:19.03
services: services:
- docker:dind - docker:dind
@ -7,6 +7,7 @@ stages:
- linting - linting
- tests - tests
# TODO, fix me : call all the pre-commit stuff instead.
black: black:
stage: linting stage: linting
image: python image: python
@ -16,16 +17,21 @@ black:
- python -m pipx ensurepath - python -m pipx ensurepath
- source ~/.profile - source ~/.profile
# Black Check # Install black
- pipx install black - pipx install black
- black --version - black --version
# Log
# Call black Check
- black --check . - black --check .
pytest: pytest:
stage: tests stage: tests
script: script:
# Install the latest pythhon version supported by this librairy # Install the the version 3.8. (the version 3.9 is the latest available)
- apk add python3==~3.9 python3-dev==~3.9 # however, docker 19.03 comes with python3.8 and docker 20.10 comes with python3.10
- apk add python3==~3.8 python3-dev==~3.8
- apk add gcc g++ libffi-dev - apk add gcc g++ libffi-dev
- apk add git - apk add git
- python3 -m venv /.gitlab-ci-venv - python3 -m venv /.gitlab-ci-venv