Select Git revision
.gitlab-ci.yml

E. Madison Bray authored
.gitlab-ci.yml 907 B
stages:
- "test"
# Override the default workflow rules to only run pipelines on the master
# branch, merge requests, or branches that contain the string 'ci/'
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^(.+\/)?ci[-\/].+/
.test: &test
before_script:
- "pip install --upgrade pip"
- "pip install -r requirements.txt"
- "pip install .[tests]"
- "pip install pytest pytest-cov"
script:
- >
pytest -v --color=yes --cov --cov-report=term
--cov-report=xml --junit-xml=pytest-xunit.xml
artifacts:
reports:
junit: pytest-xunit.xml
# enable once we have coverage reports enabled on gitlab.lri.fr
#cobertura: coverage.xml
python3.7:
stage: "test"
image: "python:3.7"
<<: *test