Merge remote-tracking branch 'origin/test/migwsgi' into experimental #977
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "experimental" ] | |
pull_request: | |
branches: [ "experimental" ] | |
permissions: | |
contents: read | |
jobs: | |
lint-python3-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up latest stable Python 3.x | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# TODO: fix unittest dir and remove from excludes | |
# TODO: fix or migrate legacy grsfs-fuse dir and remove from excludes | |
# NOTE: include tests here as they should be fully python3 compatible | |
# stop the build if there are Python syntax errors or undefined names | |
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 | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
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 | |
# NOTE: for interactive clean up one can use current ignores | |
# E501 Ignore long lines, E402 imports below top, E722 bare except, | |
# F401 unused imports, F502 explicit list in str expand, F841 unused var, | |
# E721 compare type instead of isinstance, W293 blank line with space, | |
# C901 too complex get | |
#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 | |
# TODO: prepare and enable pytest | |
#- name: Test with pytest | |
# run: | | |
# pytest | |
lint-python3-rocky9: | |
runs-on: ubuntu-22.04 | |
container: | |
image: rockylinux/rockylinux:9 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3 with DNF | |
run: | | |
dnf install -y python3 python3-pip python-unversioned-command | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# TODO: fix unittest dir and remove from excludes | |
# TODO: fix or migrate legacy grsfs-fuse dir and remove from excludes | |
# NOTE: include tests here as they should be fully python3 compatible | |
# stop the build if there are Python syntax errors or undefined names | |
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 | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
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 | |
# NOTE: for interactive clean up one can use current ignores | |
# E501 Ignore long lines, E402 imports below top, E722 bare except, | |
# F401 unused imports, F502 explicit list in str expand, F841 unused var, | |
# E721 compare type instead of isinstance, W293 blank line with space, | |
# C901 too complex get | |
#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 | |
# TODO: prepare and enable pytest | |
#- name: Test with pytest | |
# run: | | |
# pytest |