Skip to content

Commit

Permalink
Only use system Python; CI tests all python versions (#127)
Browse files Browse the repository at this point in the history
* Only use system python
* Only test on officially supported versions (2.7, 3.5)
* Swap build status badge for py versions badge
  • Loading branch information
mikemahony authored and ssteinbach committed Jul 11, 2017
1 parent 7559af2 commit 07fd4d7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 40 deletions.
25 changes: 8 additions & 17 deletions .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
11 changes: 4 additions & 7 deletions .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
18 changes: 5 additions & 13 deletions 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)
Expand All @@ -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: "\
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions 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
-----------------

Expand Down
3 changes: 0 additions & 3 deletions contrib/adapters/Makefile
Expand Up @@ -11,6 +11,3 @@ endif

test:
@python -m unittest discover tests $(TEST_ARGS)

test3.5:
@python3.5 -m unittest discover tests $(TEST_ARGS)

0 comments on commit 07fd4d7

Please sign in to comment.