TNO Intern

Commit 4ef8be42 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Putting the gitlab-ci.yml back, will try again another time in a separate MR

parent d0a10053
Loading
Loading
Loading
Loading
Loading
+13 −32
Original line number Diff line number Diff line
stages:
  - test
  - check-version-changelog
  - deploy-documentation
  - deploy

Run tests:
  stage: test
@@ -10,40 +9,22 @@ Run tests:
  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/*
    - echo "lorem ipsum"
    - 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

Version and Changelog updated:
  stage: check-version-changelog
  image: alpine:latest
  script:
    - apk update
    - apk add git
    - git --version
    - git diff --quiet main -- .\docs\changelog.md || changelog_not_changed=true
    - |
      if [ "$changelog_not_changed" = true ]; then
        echo "Pipeline failed: changelog has not been updated"
        exit 1
      fi
  only:
    - main
    - merge_requests

Deploy Documentation:
  stage:  deploy-documentation
pages:
  stage: deploy
  image: python:latest
  script:
    - pip install mkdocs mkdocs-material mkdocstrings-python