Skip to content
Snippets Groups Projects
.gitlab-ci.yml 697 B
Newer Older
image: python:3.12

Ashis Ravindran's avatar
Ashis Ravindran committed
stages:
Ashis Ravindran's avatar
Ashis Ravindran committed
  - lint
variables:
  # Set the registry URL based on your GitLab project ID
  POETRY_REPOSITORY: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"

before_script:
  - pip install --upgrade pip
  - pip install poetry
  - poetry install --only main
Ashis Ravindran's avatar
Ashis Ravindran committed

lint:
  stage: lint
  script:
    - poetry run reporting lint
Ashis Ravindran's avatar
Ashis Ravindran committed

validate:
  stage: validate
Ashis Ravindran's avatar
Ashis Ravindran committed
  script:
    - poetry run reporting validate


publish:
  stage: publish
  script:
    - poetry build --format wheel
    - poetry config repositories.gitlab ${POETRY_REPOSITORY}
    - poetry publish --username gitlab-ci-token --password ${CI_JOB_TOKEN} --repository gitlab
  only:
    - tags