From 7dd42e355ad7be2663abc3b4827144fec8325866 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:26:47 -0500 Subject: [PATCH 1/6] new python pep8 linting workflow --- .github/workflows/pep8.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pep8.yml diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml new file mode 100644 index 0000000..a48c4f1 --- /dev/null +++ b/.github/workflows/pep8.yml @@ -0,0 +1,33 @@ +name: PEP8 Linting + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install pipenv & sync + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv sync + - name: Lint + run: | + pip install pycodestyle + # PyCharm sets line length at 120 chars + pycodestyle --count --statistics --max-line-length=120 + + # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics +# - name: Test with pytest +# run: | +# pip install pytest +# pytest From c885ed694639257c354743c5b5b5d53d30031aba Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:29:46 -0500 Subject: [PATCH 2/6] lock before sync --- .github/workflows/pep8.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index a48c4f1..aed35cf 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -17,6 +17,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pipenv + pipenv lock pipenv sync - name: Lint run: | From 31f0ec61606c7e3cf0cf598e0e4cd3abe86b8a63 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:31:11 -0500 Subject: [PATCH 3/6] cd to directory and wildcard specifier --- .github/workflows/pep8.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index aed35cf..e80ff75 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -15,6 +15,7 @@ jobs: python-version: 3.8 - name: Install pipenv & sync run: | + cd triple-dungeon python -m pip install --upgrade pip pip install pipenv pipenv lock @@ -23,7 +24,7 @@ jobs: run: | pip install pycodestyle # PyCharm sets line length at 120 chars - pycodestyle --count --statistics --max-line-length=120 + pycodestyle . --count --statistics --max-line-length=120 # stop the build if there are Python syntax errors or undefined names # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics From 3a3aeee1af66351750e9656b21524e2156ba45e6 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:33:01 -0500 Subject: [PATCH 4/6] change to python 3.7 I swore to myself that I added it in. --- .github/workflows/pep8.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index e80ff75..15f4933 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.7 - name: Install pipenv & sync run: | cd triple-dungeon From 6b5a3b213ecccd4df3b11339a749fb2ee1d5dc2b Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:34:52 -0500 Subject: [PATCH 5/6] do push action only --- .github/workflows/pep8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 15f4933..59af227 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -1,6 +1,6 @@ name: PEP8 Linting -on: [push, pull_request] +on: push jobs: build: From ba59176cb6808d78a2b3c6a2eb9d5a3aa918e870 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 20 Apr 2020 00:35:59 -0500 Subject: [PATCH 6/6] remove pyflakes linting on main.yml replaced by pep8.yml action --- .github/workflows/main.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index d982882..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,12 +0,0 @@ - -name: Pyflakes Syntax Checker - -on: push - -jobs: - syntax-check: - name: Pyflakes Syntax Checker - runs-on: ubuntu-latest - steps: - - name: Pyflakes Syntax Checker - uses: lgeiger/pyflakes-action@v1.0.1