1- # This workflow will install Python dependencies, run tests and lint with a single version of Python
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3-
4- name : Python application
1+ name : CI
52
63on :
74 push :
@@ -13,27 +10,36 @@ permissions:
1310 contents : read
1411
1512jobs :
16- build :
17-
13+ test :
1814 runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ python-version : ["3.10", "3.11", "3.12"]
1918
2019 steps :
21- - uses : actions/checkout@v3
22- - name : Set up Python 3.11
23- uses : actions/setup-python@v3
20+ - uses : actions/checkout@v4
21+ - name : Set up Python ${{ matrix.python-version }}
22+ uses : actions/setup-python@v5
2423 with :
25- python-version : " 3.11"
24+ python-version : ${{ matrix.python-version }}
25+
2626 - name : Install dependencies
2727 run : |
2828 python -m pip install --upgrade pip
29- pip install flake8 pytest
29+ pip install flake8 pytest pylint
3030 pip install -e .
31+
3132 - name : Lint with flake8
3233 run : |
3334 # stop the build if there are Python syntax errors or undefined names
3435 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3536 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3637 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
39+ - name : Lint with pylint
40+ run : |
41+ pylint $(git ls-files '*.py')
42+
3743 - name : Test with pytest
3844 run : |
39- pytest
45+ pytest
0 commit comments