TNO Intern

Commit 2da71d3b authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Enabling the pipeline to read from the pydoubletcalc package registry

parent 57dbb44e
Loading
Loading
Loading
Loading
Loading
+41 −40
Original line number Diff line number Diff line
#stages:
#  - test
#  - deploy
#
#Run tests:
#  stage: test
#  tags:
#    - docker
#  image: ghcr.io/prefix-dev/pixi:latest
#  allow_failure: false
#  script:
#    - export TZ=Europe/Amsterdam
#    - ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#    - apt-get update
#    - apt-get install -y build-essential gcc tk openjdk-17-jdk
#    - export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
#    - export PATH=$JAVA_HOME/bin:$PATH
#    - export THERMOGIS_JAR=$CI_PROJECT_DIR/resources/thermogis_jar/thermogis-1.7.0-shaded.jar
#    - pixi install
#    - pixi run pytest -rx tests/
#    - rm -rf /var/lib/apt/lists/*
#  only:
#    - main
#    - merge_requests
#
#pages:
#  stage: deploy
#  image: python:latest
#  script:
#    - pip install mkdocs mkdocs-material mkdocstrings-python
#    - mkdocs build --site-dir public
#  cache:
#    key: ${CI_COMMIT_REF_SLUG}
#    paths:
#      - .cache/
#  artifacts:
#    paths:
#      - public
#  rules:
#    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
 No newline at end of file
stages:
  - test
  - deploy

Run tests:
  stage: test
  tags:
    - docker
  image: ghcr.io/prefix-dev/pixi:latest
  allow_failure: false
  script:
    - export TZ=Europe/Amsterdam
    - ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
    - apt-get update
    - apt-get install -y build-essential gcc tk openjdk-17-jdk
    - export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
    - export PATH=$JAVA_HOME/bin:$PATH
    - export THERMOGIS_JAR=$CI_PROJECT_DIR/resources/thermogis_jar/thermogis-1.7.0-shaded.jar
    - pixi install
    - pixi run pip install pydoubletcalc --index-url https://read_pydoubletcalc:$READ_PYDOUBLETCALC@ci.tno.nl/gitlab/api/v4/projects/19719/packages/pypi/simple
    - pixi run pytest -rx tests/
    - rm -rf /var/lib/apt/lists/*
  only:
    - main
    - merge_requests

pages:
  stage: deploy
  image: python:latest
  script:
    - pip install mkdocs mkdocs-material mkdocstrings-python
    - mkdocs build --site-dir public
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - .cache/
  artifacts:
    paths:
      - public
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
 No newline at end of file