Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.35 KiB
Newer Older
MJB's avatar
MJB committed
stages:  
MJB's avatar
MJB committed
  - build
  - test:scripts
  - test:monitoring
  - test:inputs
  - clean
MJB's avatar
MJB committed

build:tests:
  stage: build
MJB's avatar
MJB committed
  script: 
    - python setup.py sdist --dist-dir=build
MJB's avatar
MJB committed
  artifacts:
    paths:
MJB's avatar
MJB committed
    - build/clmctest-SNAPSHOT.tar.gz
MJB's avatar
MJB committed
    expire_in: 1 day
MJB's avatar
MJB committed
  dependencies: 
    - build:tests
MJB's avatar
MJB committed
  script: 
Michael Boniface's avatar
Michael Boniface committed
    - vagrant --fixture=scripts -- up
MJB's avatar
MJB committed
    - vagrant --fixture=scripts -- ssh test-runner -- -tt "pip3 install /vagrant/build/clmctest-SNAPSHOT.tar.gz"
MJB's avatar
MJB committed
    - vagrant --fixture=scripts -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.scripts"
  when: on_success   
  
test:monitoring:
  stage: test:monitoring
  dependencies: 
    - test:scripts
  script: 
    - vagrant --fixture=monitoring -- up
MJB's avatar
MJB committed
    - vagrant --fixture=monitoring -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.monitoring"  
  when: on_success   
  
test:inputs:
  stage: test:inputs
  dependencies: 
    - test:monitoring
  script: 
MJB's avatar
MJB committed
    - vagrant --fixture=inputs -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.inputs"
  when: on_success     
  
clean:test:
  stage: clean
  script: 
    - echo "Clean VMs"
MJB's avatar
MJB committed
  after_script:
    - vagrant --fixture=inputs -- destroy --force     
    - vagrant --fixture=monitoring -- destroy --force     
MJB's avatar
MJB committed
    - vagrant --fixture=scripts -- destroy --force