language: python
python:
  - '2.7'

jobs:
  include:
    - name: "Python 2.7 on Focal Linux"
       os: linux
       dist: focal
       python: 2.7
    - name: "Python 2.7 on macOS"
      os: osx
      python: 2.7

install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
  - 'travis_retry pip install --force-reinstall --no-binary lxml lxml'
  - 'travis_retry pip install .'
  - 'travis_retry pip install -e ".[test]"'

script:
  - 'coverage run --source=src/onelogin/saml2 --rcfile=tests/coverage.rc setup.py test'
  - 'coverage report -m --rcfile=tests/coverage.rc'
  #- 'pycodestyle tests/src/OneLogin/saml2_tests/*.py demo-flask/*.py demo-django/*.py src/onelogin/saml2/*.py --config=tests/pep8.rc'
  #- 'pyflakes src/onelogin/saml2 demo-django demo-flask tests/src/OneLogin/saml2_tests'
  - flake8 --ignore E226,E302,E41,E731,E501,C901,W504

after_success: 'coveralls'
