Skip to content
Snippets Groups Projects
Unverified Commit f56fdde5 authored by Varac's avatar Varac
Browse files

Use darker to pylint only changed lines

Closes: #82
parent 84220889
No related branches found
No related tags found
2 merge requests!58Resolve "Pylint job broken",!57Resolve "Add login panel CI/CD to create (docker) image"
Pipeline #10048 passed with stages
in 1 minute and 26 seconds
...@@ -3,9 +3,7 @@ include: ...@@ -3,9 +3,7 @@ include:
stages: stages:
- build - build
- build-test-images - lint
# TODO: Re-enable after fixing #82
# - lint
- application-test - application-test
- integration-test - integration-test
...@@ -43,7 +41,7 @@ login_provider: ...@@ -43,7 +41,7 @@ login_provider:
- .gitlab-ci.yml - .gitlab-ci.yml
integration_test_app: integration_test_app:
stage: build-test-images stage: build
variables: variables:
KANIKO_CONTEXT: "test/integration_tests" KANIKO_CONTEXT: "test/integration_tests"
KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME
...@@ -54,7 +52,7 @@ integration_test_app: ...@@ -54,7 +52,7 @@ integration_test_app:
- .gitlab-ci.yml - .gitlab-ci.yml
integration_test: integration_test:
stage: build-test-images stage: build
variables: variables:
KANIKO_CONTEXT: "test/integration_tests/test" KANIKO_CONTEXT: "test/integration_tests/test"
KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME
...@@ -66,7 +64,7 @@ integration_test: ...@@ -66,7 +64,7 @@ integration_test:
- .gitlab-ci.yml - .gitlab-ci.yml
pylint: pylint:
stage: build-test-images stage: build
variables: variables:
KANIKO_CONTEXT: "test/lint/pylint" KANIKO_CONTEXT: "test/lint/pylint"
KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME
...@@ -167,17 +165,13 @@ behave-integration: ...@@ -167,17 +165,13 @@ behave-integration:
expire_in: 1 month expire_in: 1 month
when: on_failure when: on_failure
# TODO: Fix https://open.greenhost.net/stackspin/single-sign-on/-/issues/82 pylint-lint:
# stage: lint
# pylint-lint: variables:
# stage: lint GIT_STRATEGY: clone
# variables: GIT_DEPTH: 0
# GIT_AUTHOR_NAME: "RUNNER" PYLINT_PLUGINS: "pylint_flask pylint_flask_sqlalchemy"
# GIT_AUTHOR_EMAIL: "runner@greenhost.net" image: ${CI_REGISTRY_IMAGE}/pylint:${CI_COMMIT_REF_NAME}
# PYLINT_PLUGINS: "pylint_flask pylint_flask_sqlalchemy" script:
# image: ${CI_REGISTRY_IMAGE}/pylint:${CI_COMMIT_REF_NAME} - git branch -a
# script: - darker -L pylint --diff --revision remotes/origin/main .
# - echo "Reverting back to main to squash commits"
# - git reset --soft main
# - git lint
FROM python:3.9-alpine FROM python:3.10-alpine
RUN apk add build-base git bc COPY requirements.txt /
COPY requirements.txt ./ RUN apk add --no-cache \
RUN pip3 install --no-cache-dir -r requirements.txt build-base=0.5-r2 \
git=2.34.1-r0 \
bc=1.07.1-r1 && \
pip3 install --no-cache-dir -r requirements.txt
darker
pylint pylint
pylint-flask-sqlalchemy pylint-flask-sqlalchemy
pylint-flask pylint-flask
git-lint
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