From b5fa9bb1be3ac7182084ced1e1cab248a2f27bb0 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Fri, 29 Jul 2022 19:28:15 -0400 Subject: [PATCH] ci: update global python (#277) Co-authored-by: LizardByte-bot <108553330+RetroArcher-bot@users.noreply.github.com> --- .flake8 | 6 ++++++ .github/workflows/python-flake8.yml | 30 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .flake8 create mode 100644 .github/workflows/python-flake8.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..2ea73951 --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +filename = + *.py +max-line-length = 120 +extend-exclude = + venv/ diff --git a/.github/workflows/python-flake8.yml b/.github/workflows/python-flake8.yml new file mode 100644 index 00000000..8769016f --- /dev/null +++ b/.github/workflows/python-flake8.yml @@ -0,0 +1,30 @@ +# This action is centrally managed in https://github.com//.github/ +# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in +# the above-mentioned repo. + +name: flake8 + +on: + pull_request: + branches: [master, nightly] + types: [opened, synchronize, reopened] + +jobs: + flake8: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 # https://github.com/actions/setup-python + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools flake8 + + - name: Test with flake8 + run: | + python -m flake8 --verbose