From d435a21a420c84fc3c7f3e6fa6d5345958d4de4d Mon Sep 17 00:00:00 2001 From: adinhodovic Date: Thu, 30 May 2024 19:44:35 +0200 Subject: [PATCH] chore: remove vendor --- vendor/drone-jsonnet | 1 - .../drone-jsonnet/python.libsonnet | 98 ------------------- 2 files changed, 99 deletions(-) delete mode 120000 vendor/drone-jsonnet delete mode 100644 vendor/github.com/danihodovic/drone-jsonnet/python.libsonnet diff --git a/vendor/drone-jsonnet b/vendor/drone-jsonnet deleted file mode 120000 index f57e333..0000000 --- a/vendor/drone-jsonnet +++ /dev/null @@ -1 +0,0 @@ -github.com/danihodovic/drone-jsonnet \ No newline at end of file diff --git a/vendor/github.com/danihodovic/drone-jsonnet/python.libsonnet b/vendor/github.com/danihodovic/drone-jsonnet/python.libsonnet deleted file mode 100644 index cb36838..0000000 --- a/vendor/github.com/danihodovic/drone-jsonnet/python.libsonnet +++ /dev/null @@ -1,98 +0,0 @@ -local pythonStepCommon = { - depends_on: ['install-python-deps'], - volumes: [ - { name: 'cache', path: '/tmp/cache' }, - ], - commands: [ - '. .poetry/cache/virtualenvs/*/bin/activate', - ], -}; - -local installDepsStep = pythonStepCommon { - name: 'install-python-deps', - depends_on: ['restore-cache'], - commands: [ - ||| - export POETRY_HOME=$DRONE_WORKSPACE/.poetry - export POETRY_CACHE_DIR=$POETRY_HOME/cache - if [ ! -d "$POETRY_HOME" ]; then - curl -fsS -o /tmp/install-poetry.py https://install.python-poetry.org - python /tmp/install-poetry.py -y - fi - |||, - '$POETRY_HOME/bin/poetry install --no-root', - ], -}; - -local formatStep = pythonStepCommon { - name: 'format', - commands+: [ - 'black . --check', - 'isort --check-only .', - ], -}; - -local mypyStep = pythonStepCommon { - name: 'typecheck', - commands+: [ - 'mypy .', - ], -}; - - -local pylintStep = pythonStepCommon { - name: 'lint', - commands+: [ - "pylint $(git ls-files -- '*.py' ':!:**/migrations/*.py')", - ], -}; - -local testStep = pythonStepCommon { - name: 'test', - commands+: ['pytest --ignore=.poetry --cov'], -}; - - -local pipelineCommon(image) = { - kind: 'pipeline', - type: 'docker', - name: 'python', - trigger: { - event: [ - 'push', - ], - }, - volumes: [ - { - name: 'cache', - host: { - path: '/tmp/cache', - }, - }, - { - name: 'poetry', - temp: {}, - }, - { - name: 'poetry-cache', - temp: {}, - }, - ], - steps: [ - installDepsStep { image: image }, - formatStep { image: image }, - mypyStep { image: image }, - pylintStep { image: image }, - testStep { image: image }, - ], -}; - -{ - pythonPipeline: { - new(pipeline, image): pipelineCommon(image) + pipeline, - }, - dockerPipeline: { - kind: 'pipeline', - type: 'docker', - }, -}