|
79 | 79 | # run: |
|
80 | 80 | # pytest
|
81 | 81 |
|
| 82 | + lint-python3-rocky9: |
| 83 | + runs-on: ubuntu-22.04 |
| 84 | + container: |
| 85 | + image: rockylinux/rockylinux:8 |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v4 |
| 88 | + - name: Set up Python 3 with DNF |
| 89 | + run: | |
| 90 | + dnf install -y python3 python3-pip python-unversioned-command |
| 91 | + - name: Install dependencies |
| 92 | + run: | |
| 93 | + python -m pip install --upgrade pip |
| 94 | + pip install flake8 pytest |
| 95 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 96 | + - name: Lint with flake8 |
| 97 | + run: | |
| 98 | + # TODO: fix unittest dir and remove from excludes |
| 99 | + # TODO: fix or migrate legacy grsfs-fuse dir and remove from excludes |
| 100 | + # NOTE: include tests here as they should be fully python3 compatible |
| 101 | + # stop the build if there are Python syntax errors or undefined names |
| 102 | + flake8 . --exclude=state,envhelp,fixture,output,unittest,grsfs-fuse,irclib.py,seafile-seahub_settings-template.py --count --select=E9,F63,F7,F82 --show-source --statistics |
| 103 | + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
| 104 | + flake8 . --exclude=state,envhelp,fixture,output,unittest,grsfs-fuse,vm-proxy,irclib.py,seafile-seahub_settings-template.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 105 | + # NOTE: for interactive clean up one can use current ignores |
| 106 | + # E501 Ignore long lines, E402 imports below top, E722 bare except, |
| 107 | + # F401 unused imports, F502 explicit list in str expand, F841 unused var, |
| 108 | + # E721 compare type instead of isinstance, W293 blank line with space, |
| 109 | + # C901 too complex get |
| 110 | + #flake8 mig --exclude=unittest,grsfs-fuse,vm-proxy,irclib.py,seafile-seahub_settings-template.py --ignore=E501,E402,E722,F401,F502,E713,F841,C901 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 111 | + # TODO: prepare and enable pytest |
| 112 | + #- name: Test with pytest |
| 113 | + # run: | |
| 114 | + # pytest |
0 commit comments