diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33d104722..f3356fbe2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,18 @@ -image: python:2.7 +before_script: + - pip install pep8 pyflakes flake8 coverage -stages: - - test - -Lint: +Python 2.7: stage: test + image: python:2.7 script: - - pip install pep8 pyflakes flake8 - make lint - -Test Python 2.7: - stage: test - script: - make test + - make coverage -Test Python 3.5: +Python 3.5: stage: test image: python:3.5 script: - - make test3.5 - -Coverage: - stage: test - script: - - pip install coverage + - make lint + - make test - make coverage diff --git a/.travis.yml b/.travis.yml index 730f8fcda..ea3f7187c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,12 @@ language: python -matrix: - include: - - python: "2.7" - env: TEST_SUITE= - - python: "3.5" - env: TEST_SUITE=3.5 +python: + - "2.7" + - "3.5" install: - pip install pep8 pyflakes flake8 coverage script: - - make test$TEST_SUITE VERBOSE=1 - make lint + - make test - make coverage diff --git a/Makefile b/Makefile index 32fe4ffe4..24fdf25bf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: coverage test test3.5 test_first_fail clean autopep8 lint doc-html +.PHONY: coverage test test_first_fail clean autopep8 lint doc-html COV_PROG := $(shell command -v coverage 2> /dev/null) PEP8_PROG := $(shell command -v pep8 2> /dev/null) @@ -17,25 +17,17 @@ OTIO_DEFAULT_MEDIA_LINKER = test-core: @echo "Running Core tests..." - @python2.7 -m unittest discover tests $(TEST_ARGS) + @python --version + @python -m unittest discover tests $(TEST_ARGS) test-contrib: @echo "Running Contrib tests..." + @python --version @make -C contrib/adapters test VERBOSE=$(VERBOSE) # run all the unit tests test: test-core test-contrib -test3.5-core: - @echo "Running Core (python3.5) tests..." - @python3.5 -m unittest discover tests $(TEST_ARGS) - -test3.5-contrib: - @echo "Running Contrib(python3.5) tests..." - @make -C contrib/adapters test3.5 VERBOSE=$(VERBOSE) - -test3.5: test3.5-core test3.5-contrib - coverage: ifndef COV_PROG $(error "coverage is not available please see: "\ @@ -46,7 +38,7 @@ endif # run all the unit tests, stopping at the first failure test_first_fail: - @python2.7 -m unittest discover tests --failfast + @python -m unittest discover tests --failfast # remove pyc files clean: diff --git a/README.md b/README.md index e04ead850..41a85784a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ OpenTimelineIO ============== +![Supported Versions](https://img.shields.io/badge/python-2.7%2C%203.5-blue.svg) + PRE-RELEASE NOTICE ----------------- diff --git a/contrib/adapters/Makefile b/contrib/adapters/Makefile index 589e4e6d6..90ef9ff3f 100644 --- a/contrib/adapters/Makefile +++ b/contrib/adapters/Makefile @@ -11,6 +11,3 @@ endif test: @python -m unittest discover tests $(TEST_ARGS) - -test3.5: - @python3.5 -m unittest discover tests $(TEST_ARGS)