
before_script:
  - python3 -m venv myenv
  - source myenv/bin/activate
  - pip3 install -r requirements.txt

after_script:
  - deactivate

stages:
  - test
  - stop

test_job:
  stage: test
  script:
    - ./start.sh
    - ./stop.sh
  only:
    - master

stop:
  stage: stop
  script:
    - ./stop.sh
  only:
    - master
  when: on_failure


before_script:
  - python3 -m venv myenv
  - source myenv/bin/activate
  - pip3 install -r requirements.txt

stages:
  - test
  - stop

test_job:
  stage: test
  script:
    - ./start.sh
    - ./stop.sh
  only:
    - master

stop:
  stage: stop
  script:
    - ./stop.sh
  only:
    - master
  when: on_failure

Remove after_script from CI -- it isn't necessary and is currently broken in Gitlab 9.0.0
Remove after_script from CI -- it isn't necessary and is currently broken in Gitlab 9.0.0
