Skip to content
Snippets Groups Projects
package-build.template.yml 721 B
Newer Older
# CI Build Template
.build-pexes:
    image: python:3.10
    script:
Daniel Lyons's avatar
Daniel Lyons committed
        - WD=$PWD
        - cd ${PACKAGE_PATH}

        # Install build, poetry and pytest
        - pip install build poetry pytest

        # Install the package for testing
        - pip install .
        - CAPO_PROFILE=docker pytest test

        # Build the package and push to the gitlab repo
        - poetry build
        - 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
Daniel Lyons's avatar
Daniel Lyons committed
        - cd $WD