# CI Build Template
.build-pexes:
    image: python:3.10
    script:
        - pip install build twine poetry pytest
        - WD=$PWD
        - cd ${PEX_PATH}
        - poetry install --with test
        - poetry build
        - pytest test
        - poetry config repositories.gitlab "https://gitlab.nrao.edu/api/v4/projects/$CI_PROJECT_ID/packages/pypi"
        - poetry config http-basic.gitlab gitlab-ci-token "$CI_JOB_TOKEN"
        - poetry publish --repository gitlab
        - cd $WD