1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
# Notes: Dependencies were not working as passed in variables
.pytest_template: &pytest_template
stage: test
image: "${docker_image}"
script:
- python -m pip install pytest
- wheel_file=$(ls "${CI_PROJECT_DIR}"/dist/easy_ansi*.whl)
- echo "Wheel File - ${wheel_file}"
- python -m pip install "${wheel_file}"
- cd "${CI_PROJECT_DIR}"/easyansi
- python -m pytest --rootdir="${CI_PROJECT_DIR}/tests" "${CI_PROJECT_DIR}/tests/"
cache:
key: "${cache_key}"
paths:
- .cache/pip/
.mypy_template: &mypy_template
stage: test
image: "${docker_image}"
script:
- python -m pip install mypy
- python -m mypy --strict --python-version 3.6 "${CI_PROJECT_DIR}/build/lib/easyansi/"
cache:
key: "${cache_key}"
paths:
- .cache/pip/
pytest_python36:
<<: *pytest_template
variables:
docker_image: "python:3.6"
cache_key: "python36_cache"
dependencies:
- "build_python36"
pytest_python37:
<<: *pytest_template
variables:
docker_image: "python:3.7"
cache_key: "python37_cache"
dependencies:
- "build_python37"
pytest_python38:
<<: *pytest_template
variables:
docker_image: "python:3.8"
cache_key: "python38_cache"
dependencies:
- "build_python38"
mypy_python36:
<<: *mypy_template
variables:
docker_image: "python:3.6"
cache_key: "python36_cache"
dependencies:
- "build_python36"
# MyPy does not need to be run on multiple Python versions
#mypy_python37:
# <<: *mypy_template
# variables:
# docker_image: "python:3.7"
# cache_key: "python37_cache"
# dependencies:
# - "build_python37"
#
#
#mypy_python38:
# <<: *mypy_template
# variables:
# docker_image: "python:3.8"
# cache_key: "python38_cache"
# dependencies:
# - "build_python38"
|