diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 7f70219..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,82 +0,0 @@ -stages: - - lint - - build - - test - - deploy - -# Change pip's cache directory to be inside the project directory since we can -# only cache local items. -variables: - PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - -cache: - paths: - - .cache/pip - - .tox/ - - venv/ - -default: - before_script: - - python --version # For debugging - - pip install virtualenv - - virtualenv venv - - source venv/bin/activate - - pip install tox - - pip install poetry - -lint_job: - stage: lint - # Official language image. Look for the different tagged releases at: - # https://hub.docker.com/r/library/python/tags/ - image: python:${PYTHON_VERSION} - script: - - tox -e ${TOXENV} - parallel: - matrix: - - PYTHON_VERSION: "3.10" - TOXENV: [bandit, black, flake8] - -test_job: - stage: test - when: on_success - # Official language image. Look for the different tagged releases at: - # https://hub.docker.com/r/library/python/tags/ - image: python:${PYTHON_VERSION} - script: - - tox -e ${TOXENV} - parallel: - matrix: - - PYTHON_VERSION: "3.9" - TOXENV: [py39] - - PYTHON_VERSION: "3.10" - TOXENV: [py310] - - PYTHON_VERSION: "3.11" - TOXENV: [py311] - - PYTHON_VERSION: "3.12" - TOXENV: [py312] - -build_job: - stage: build - when: on_success - image: python:3.10 - script: - - poetry build - - pip install dist/*.whl - artifacts: - paths: - - dist/*.whl - -build_package: - stage: deploy - image: python:latest - before_script: - - python3 -m pip install --upgrade twine - - python3 -m pip install --upgrade build - variables: - TWINE_USERNAME: $PYPI_USERNAME - TWINE_PASSWORD: $PYPI_PASSWORD - script: - - python3 -m build - - python3 -m twine upload dist/* - only: - - tags