Commit b0332e5e authored by Ruben ten Hove's avatar Ruben ten Hove Committed by Federico Falconieri
Browse files

test: add python3.6 test project

parent 4d019c6c
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -42,6 +42,23 @@ python:pytest:
    # without breaking other jobs
    PYTHON_PACKAGE: mypackage

docker:kaniko:python-old:
  extends: docker:kaniko
  variables:
    CONTEXT: templates_tests/python36

python:black-old:
  extends: python:black
  variables:
    PYTHON_PACKAGE: "templates_tests/python36/mypackage"
  needs: ["docker:kaniko:python-old"]

python:poetry:pylint-old:
  extends: python:pylint
  variables:
    PYTHON_PACKAGE: "templates_tests/python36/mypackage"
  needs: ["docker:kaniko:python-old"]

c:cppcheck:
  variables:
    ERROR_EXIT_CODE: 0
+4 −0
Original line number Diff line number Diff line
FROM python:3.6-slim
COPY . /project
WORKDIR /project
RUN pip install .
+3 −0
Original line number Diff line number Diff line
# python project

Mock up python project to be used in tests for CI templates.
+3 −0
Original line number Diff line number Diff line
"""
Well well, what to write here?
"""
+20 −0
Original line number Diff line number Diff line
"""
This module is quite excellent for any number of testing purposes.
"""


def myfunction(variable: int) -> int:
    """this function is very useful"""
    return variable * 3 + 2


def myotherfunction(variable: int) -> int:
    """this function is even more useful"""
    return variable - 1


def too_complicated() -> None:
    """this function will increase code complexity"""
    for i in range(1000):
        print("was this really necessary??")
    print("I guess it was")
Loading