Skip to content

Update python-package.yml #109

Update python-package.yml

Update python-package.yml #109

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
environment: CI
steps:
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
python -m pip install --upgrade pip
pip install --force-reinstall --no-binary lxml lxml
pip install -t .
pip install -t -e ".[test]"
- name: Lint
run: |
#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
- name: Test
run: |
coverage run --source=src/onelogin/saml2 --rcfile=tests/coverage.rc setup.py test
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install python-coveralls
coveralls