Skip to content

Commit 25f35fa

Browse files
authored
Merge pull request #277 from akx/embetter-ci
CI improvements
2 parents 3bd411d + 603f951 commit 25f35fa

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,40 @@ jobs:
1919
uses: actions/setup-python@v2
2020
with:
2121
python-version: ${{ matrix.python-version }}
22-
22+
- uses: actions/cache@v2
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
2328
- name: Install dependencies
2429
run: |
2530
sudo apt-get update -qq
2631
sudo apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
2732
make install-req
2833
make install-test
29-
3034
- name: Test
35+
run: make pytest
36+
lint:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: actions/setup-python@v2
41+
with:
42+
python-version: 3.9
43+
- uses: actions/cache@v2
44+
with:
45+
path: ~/.cache/pip
46+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
47+
restore-keys: |
48+
${{ runner.os }}-pip-
49+
- name: Install dependencies
50+
run: |
51+
sudo apt-get update -qq
52+
sudo apt-get install -qq swig python-dev libxml2-dev libxmlsec1-dev
53+
make install-req
54+
make install-test
55+
- name: Run linters
3156
run: |
32-
make pytest
3357
make pycodestyle
3458
make flake8
35-

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ COVERAGE=coverage
66
COVERAGE_CONFIG=tests/coverage.rc
77
PEP8_CONFIG=tests/pep8.rc
88
MAIN_SOURCE=src/onelogin/saml2
9-
DEMOS=demo-django demo-flask
9+
DEMOS=demo-django demo-flask demo-tornado demo_pyramid
1010
TESTS=tests/src/OneLogin/saml2_tests
11-
SOURCES=$(MAIN_SOURCE) $(DEMO) $(TESTS)
11+
SOURCES=$(MAIN_SOURCE) $(DEMOS) $(TESTS)
1212

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

2727
flake8:
28-
$(FLAKE8) --ignore=E501,E731,W504 $(SOURCES)
28+
$(FLAKE8) $(SOURCES)
2929

3030
clean:
3131
rm -rf .pytest_cache/

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = E731,W504
2+
ignore = E731,W504,E501
33
max-complexity = 48
44
max-line-length = 1900
55

0 commit comments

Comments
 (0)