Skip to content
Snippets Groups Projects
.gitlab-ci.yml 6.07 KiB
image: continuumio/anaconda3

stages:
  - test
  - test_plugins
  - build
  - deploy

# ===== TEST PyWake debian=====
test_PyWake:  # name the job what we like
  image: continuumio/anaconda3
  stage:  # build, test, deploy defined by default [2]
    test
  script:
  - pip install -e .[test] --timeout 3600 --default-timeout=3600
  - pytest
  tags:  # only runners with this tag can do the job [3]
  - ci-ubuntu

## ===== TEST PyWake debian=====
#test_PyWake_python3.6:  # name the job what we like
#  image:   continuumio/anaconda3:5.2.0
#  stage:  # build, test, deploy defined by default [2]
#    test
#  script:
#  - apt update
#  - apt install libgl1-mesa-glx -y
#  - python -m pip install --upgrade --force-reinstall pip
#  - pip install tensorflow --user
#  - pip install -e .[test] --timeout 3600 --default-timeout=3600
#  - python -c "from pathlib import Path; Path('matplotlibrc').write_text('backend'+chr(58)+' Agg')"
#  - pytest
#  tags:  # only runners with this tag can do the job [3]
#  - ci-ubuntu



# ===== Check code style =====
check_code_style:  # name the job what we like
  stage:  # build, test, deploy defined by default [2]
    test
  script:
  - pip install -e . --user
  - pycodestyle --ignore=E501,W504,E741 py_wake
  tags:  # only runners with this tag can do the job [3]
  - python

# ===== TEST PyWake on Windows =====
test_PyWake_windows:  # name the job what we like
  stage:  # build, test, deploy defined by default [2]
    test
  coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
  script:  # runs on windows machine due to tag below
  - conda init powershell
  - "if (test-path $PROFILE.CurrentUserAllHosts) { & $PROFILE.CurrentUserAllHosts}"
  - conda activate py38
  - pip install -e .[test] --no-deps
  - pytest --cov-report term-missing:skip-covered --cov=py_wake --cov-config .coveragerc
  tags:  # tag for shared runner on windows machine
  - ANMH_old

# ===== Trigger PyWakePark pipeline =====
trigger_pywake_park_test:
  stage: test_plugins
  variables:
    TRIGGER_BRANCH: $CI_COMMIT_REF_NAME
  trigger:
    project: TOPFARM/cuttingedge/pywake/pywake_park
    strategy: depend
  only: