From 59b8e61ca37525c1a3aa869562da9d0eabfce326 Mon Sep 17 00:00:00 2001 From: Nekaida Date: Mon, 19 Sep 2022 21:18:31 +0200 Subject: [PATCH] Setup simple CI workflow --- .github/workflows/python-app.yml | 46 ++++++++++++++++++++++++++++++++ pyproject.toml | 5 ++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/python-app.yml create mode 100644 pyproject.toml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 00000000..d57ad164 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,46 @@ +name: TwitchCordBot + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black mypy pylint pydocstyle pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Check formatting with black + run: | + black . --check --diff + continue-on-error: true + - name: Lint with pylint + run: | + pylint *.py + continue-on-error: true + - name: Type checking with mypy + run: | + mypy . + continue-on-error: true + - name: Check doc strings with pydocstyle + run: | + pydocstyle . + continue-on-error: true +# - name: Test with pytest +# run: | +# pytest diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..9f01f420 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[tool.black] +line_length = 120 + +[tool.pylint] +max-line-length = 120