Commit 5cbf2ca7 authored by Javi Moreno's avatar Javi Moreno
Browse files

Changes in the pytest job

parent d0574415
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -34,16 +34,6 @@ push monitoring:
      - src/$IMAGE_NAME/**
      - .gitlab-ci.yml

# apply unit test to the monitoring component
test monitoring pytest:
  stage: test
  script:
    - pytest --junitxml=report.xml
  artifacts:
    when: always
    reports:
      junit: report.xml
    expire_in: 1 day

# test if the Docker image can be pulled from the gitlab registry
test monitoring pull:
@@ -80,3 +70,18 @@ test monitoring run:
    paths:
      - deploy_test_report.txt
    expire_in: 1 day

# apply unit test to the monitoring component
test monitoring pytest:
  stage: test
  needs:
    - test monitoring run
  script:
    - docker run -d -p 7070:7070 --name monitoring-test --network=teraflowbridge --rm "$IMAGE_NAME:$IMAGE_TAG"
    - docker exec -it monitoring-test bash
    - pytest --junitxml=report.xml
  artifacts:
    when: always
    reports:
      junit: report.xml
    expire_in: 1 day