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

stages:
  - test
  - test_plugins
  - 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

  
# ===== 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 .
  - 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
  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]
  - 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:
    - schedules

# ===== Trigger PyWakeEllipSys pipeline =====
trigger_pywake_ellipsys_test:
  stage: test_plugins
  variables:
    TRIGGER_BRANCH: $CI_COMMIT_REF_NAME
  trigger:
    project: TOPFARM/cuttingedge/pywake/pywake_ellipsys
    strategy: depend
  only:
    - schedules

# ===== Trigger TriggerHub pipeline =====
trigger_hub_test:
  stage: test
  variables:
    TRIGGER_BRANCH: $CI_COMMIT_REF_NAME
  trigger: