Skip to content
Snippets Groups Projects

Trusted add pipeline

Closed Ihor Anikeiev [EPAM / GCP] requested to merge trusted-Add-pipeline into main
48 files
+ 8674
63
Compare changes
  • Side-by-side
  • Inline
Files
48
+ 99
0
variables:
SRC_FILES: "src/"
REQUIREMENTS_FILE: "pyproject.toml"
.python:
image: python:3.11
tags:
- osdu-small
before_script:
- apt-get update
- apt-get install -y jq curl
- pip install --upgrade pip
- pip install nox
- pip install nox-poetry
- pip install poetry
- poetry --version
#isort:
# needs: [ ]
# extends: [ ]
# script:
# echo 'empty'
# only:
# - $DISABLED == 'true'
python-static-analysis:
needs: [ ]
extends: [ ]
script:
echo 'empty'
only:
- $DISABLED == 'true'
ruff:
tags: ["osdu-small"]
image: python:3.11-slim
extends: .python
stage: linters
allow_failure: false
script:
- poetry install
- poetry run ruff check .
#pylint:
# tags: ["osdu-small"]
# image: python:3.11-slim
# extends: .python
# stage: linters
# allow_failure: true
# script:
# - poetry install --no-dev
# - poetry add --dev pylint pylint-exit
# - poetry run pylint ${SRC_FILES}
mypy:
tags: ["osdu-small"]
image: python:3.11-slim
extends: .python
stage: linters
allow_failure: true
script:
- poetry install --no-dev
- poetry add --dev mypy
- poetry run mypy ${SRC_FILES}
#pylint:
# tags: ["osdu-small"]
# image:
# name: apache/airflow:2.1.2-python3.8
# entrypoint: [""]
# stage: linters
# allow_failure: true
# script:
# - pip install setuptools pylint==2.17.6 pylint_quotes==0.2.3 pylint-exit==1.2.0
# - sh -c 'pylint --rcfile=.pylintrc ${SRC_FILES}' || EXIT_CODE=$?
# - exit ${EXIT_CODE}
#isort:
# tags: ["osdu-small"]
# image: python:3.8.12-slim
# allow_failure: true
# stage: linters
# script:
# - python -m pip install setuptools isort
# - isort -c -v ${SRC_FILES} || EXIT_CODE=$?
# - exit ${EXIT_CODE}
#python-static-analysis:
# tags: ["osdu-small"]
# image: community.opengroup.org:5555/osdu/platform/deployment-and-operations/pytype-container/pytype:latest
# stage: linters
# variables:
# EXCLUDE: ""
# script:
# - pip install -r $REQUIREMENTS_FILE
# - pytype $SRC_FILES -k -j auto --exclude $EXCLUDE
Loading