Commit e4459a01 authored by Bruno S. Morgado's avatar Bruno S. Morgado
Browse files

Merge remote-tracking branch 'origin/master'

parents 8d61a85f aae01ae5
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+35 −0
Original line number Diff line number Diff line
# GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application.
# Docker, when used with GitLab CI, runs each job in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml.
# In this case we use the latest python docker image to build and test this project.
image: python:latest

# cache is used to specify a list of files and directories which should be cached between jobs. You can only use paths that are within the project workspace.
# If cache is defined outside the scope of jobs, it means it is set globally and all jobs will use that definition
cache:
  paths:
    - venv/
    
# before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts. 
# This can be an array or a multi-line string.
before_script:
  - python -V  # Print out python version for debugging
  - pip install virtualenv
  - virtualenv venv
  - source venv/bin/activate

# The YAML file defines a set of jobs with constraints stating when they should be run. 
# You can specify an unlimited number of jobs which are defined as top-level elements with an arbitrary name and always have to contain at least the script clause.
# In this case we have only the test job which produce an artifacts (it must be placed into a directory called "public")
# It is also specified that only the master branch will be subject of this job. 
test:
  script:
  - python setup.py test
  - ls -la
  - mkdir .public
  - cp -r htmlcov/* .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
  - master