Skip to content

Commit

Permalink
Merge pull request #277 from akx/embetter-ci
Browse files Browse the repository at this point in the history
CI improvements
  • Loading branch information
pitbulk authored Jul 26, 2021
2 parents 3bd411d + 603f951 commit 25f35fa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,40 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
make install-req
make install-test
- name: Test
run: make pytest
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
make install-req
make install-test
- name: Run linters
run: |
make pytest
make pycodestyle
make flake8
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ COVERAGE=coverage
COVERAGE_CONFIG=tests/coverage.rc
PEP8_CONFIG=tests/pep8.rc
MAIN_SOURCE=src/onelogin/saml2
DEMOS=demo-django demo-flask
DEMOS=demo-django demo-flask demo-tornado demo_pyramid
TESTS=tests/src/OneLogin/saml2_tests
SOURCES=$(MAIN_SOURCE) $(DEMO) $(TESTS)
SOURCES=$(MAIN_SOURCE) $(DEMOS) $(TESTS)

install-req:
$(PIP) install --upgrade 'setuptools<45.0.0'
Expand All @@ -25,7 +25,7 @@ pycodestyle:
$(PYCODESTYLE) --ignore=E501,E731,W504 $(SOURCES) --config=$(PEP8_CONFIG)

flake8:
$(FLAKE8) --ignore=E501,E731,W504 $(SOURCES)
$(FLAKE8) $(SOURCES)

clean:
rm -rf .pytest_cache/
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E731,W504
ignore = E731,W504,E501
max-complexity = 48
max-line-length = 1900

Expand Down

0 comments on commit 25f35fa

Please sign in to comment.