Skip to content

Commit f6c9295

Browse files
authored
Create separate GitHub action python-linters (#236)
separated the lint build from tests builds, linters will now not run on every python + LXML version, which does not make any sense anyway (and is currently breaking builds for py 3.7 due transitive dependencies conflicts). passing tests and passing linters are still mandatory for PR, but now the pip install dependencies configuration is easier to satisfy on the linter side + saving a bit time.
1 parent 94ba8c4 commit f6c9295

File tree

2 files changed

+49
-11
lines changed

2 files changed

+49
-11
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies and run linters for the codebase
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: lint the package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.10.1"]
20+
lxml-version: ["4.9.1"]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Install lxml dependencies
26+
run: sudo apt-get install -y libxml2-dev libxslt-dev
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
python -m pip install lxml==${{ matrix.lxml-version }}
37+
python -m pip install -r dev-requirements.txt
38+
python -m pip install -r requirements.txt
39+
40+
- name: Lint
41+
run: |
42+
make lint
43+
44+
- name: Security
45+
uses: jpetrucciani/bandit-check@master
46+
with:
47+
bandit_flags: '-lll'

.github/workflows/python-package.yml renamed to .github/workflows/python-tests-compatibility.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
1+
# This workflow will install Python dependencies, run tests with variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: test the package
55

66
on:
77
push:
@@ -52,18 +52,9 @@ jobs:
5252
python -m pip install -r dev-requirements.txt
5353
python -m pip install -r requirements.txt
5454
55-
- name: Lint
56-
run: |
57-
make lint
58-
5955
- name: Test
6056
run: |
6157
make test report-coverage
6258
63-
- name: Security
64-
uses: jpetrucciani/bandit-check@master
65-
with:
66-
bandit_flags: '-lll'
67-
6859
- name: Upload Coverage to Codecov
6960
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)