-
-
Notifications
You must be signed in to change notification settings - Fork 305
40 lines (34 loc) · 1.42 KB
/
python-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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: Checkout project
uses: actions/checkout@v3
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
pip install --disable-pip-version-check --no-cache-dir --force-reinstall --no-binary lxml lxml
pip install --disable-pip-version-check --no-cache-dir .
pip install --disable-pip-version-check --no-cache-dir -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