Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc95f7d

Browse files
committed
Add lint job for matplotlib.cm in basemap workflows
1 parent c4805e3 commit fc95f7d

File tree

2 files changed

+97
-2
lines changed

2 files changed

+97
-2
lines changed

.github/workflows/basemap-for-manylinux.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,56 @@ jobs:
2929
name: checkout
3030
path: .
3131

32+
lint:
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
python-version:
37+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
38+
max-parallel: 3
39+
fail-fast: false
40+
needs: checkout
41+
container: "pylegacy/python:${{ matrix.python-version }}-debian-8"
42+
steps:
43+
-
44+
name: Download checkout
45+
uses: actions/download-artifact@v1
46+
with:
47+
name: checkout
48+
path: .
49+
-
50+
name: Install lint requirements
51+
run: |
52+
cd ${{ env.PKGDIR }}
53+
pip install -r requirements-lint.txt
54+
-
55+
name: Install library requirements
56+
run: |
57+
cd ${{ env.PKGDIR }}
58+
pip install --prefer-binary -r requirements.txt
59+
-
60+
name: Run Flake8
61+
run: |
62+
cd ${{ env.PKGDIR }}
63+
if [ -x "$(command -v flake8)" ]; then
64+
flake8 src/mpl_toolkits/basemap/cm.py;
65+
fi
66+
-
67+
name: Run PyLint
68+
run: |
69+
cd ${{ env.PKGDIR }}
70+
if [ -x "$(command -v pylint)" ]; then
71+
pylint src/mpl_toolkits/basemap/cm.py;
72+
fi
73+
3274
build-geos:
3375
strategy:
3476
matrix:
3577
arch:
3678
["x64", "x86"]
3779
max-parallel: 2
3880
fail-fast: false
39-
needs: checkout
81+
needs: lint
4082
runs-on: ubuntu-latest
4183
container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-4"
4284
steps:

.github/workflows/basemap-for-windows.yml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,59 @@ jobs:
2929
name: checkout
3030
path: .
3131

32+
lint:
33+
runs-on: windows-latest
34+
strategy:
35+
matrix:
36+
python-version:
37+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
38+
max-parallel: 3
39+
fail-fast: false
40+
needs: checkout
41+
steps:
42+
-
43+
name: Download checkout
44+
uses: actions/download-artifact@v1
45+
with:
46+
name: checkout
47+
path: .
48+
-
49+
name: Set Python
50+
uses: actions/setup-python@v2
51+
with:
52+
architecture: ${{ matrix.arch }}
53+
python-version: ${{ matrix.python-version }}
54+
-
55+
name: Set Python base packages
56+
run: |
57+
python -m pip install --upgrade pip setuptools wheel
58+
-
59+
name: Install lint requirements
60+
run: |
61+
cd ${{ env.PKGDIR }}
62+
python -m pip install -r requirements-lint.txt
63+
-
64+
name: Install library requirements
65+
run: |
66+
cd ${{ env.PKGDIR }}
67+
pip install --prefer-binary -r requirements.txt
68+
-
69+
name: Run Flake8
70+
run: |
71+
cd ${{ env.PKGDIR }}
72+
if (Get-Command flake8 -errorAction SilentlyContinue)
73+
{
74+
flake8 src/mpl_toolkits/basemap/cm.py;
75+
}
76+
-
77+
name: Run PyLint
78+
run: |
79+
cd ${{ env.PKGDIR }}
80+
if (Get-Command pylint -errorAction SilentlyContinue)
81+
{
82+
pylint src/mpl_toolkits/basemap/cm.py;
83+
}
84+
3285
build-geos:
3386
strategy:
3487
matrix:
@@ -51,7 +104,7 @@ jobs:
51104
cmake-version: "3.13.2"
52105
max-parallel: 4
53106
fail-fast: false
54-
needs: checkout
107+
needs: lint
55108
runs-on: windows-latest
56109
steps:
57110
-

0 commit comments

Comments
 (0)