Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-15 14:17:29 +0000
committerGitHub <noreply@github.com>2021-05-15 14:17:29 +0000
commitdfafed6b14fbc03a1833937df5d83d7c5f324949 (patch)
tree4ee15198aabf6b7e53822225f50ca4c2d050ee9b
parente4e5e3db2d4d0124a63f3ad67dbf92d2401af68a (diff)
parent2d5564a7c2f1b7b79c948f9f19a680dea6cb001d (diff)
Merge pull request #444 from dylanmtaylor/patch-7
Bring in some of the good CI changes from #411
-rw-r--r--.flake82
-rw-r--r--.github/workflows/lint-python.yaml40
-rw-r--r--.github/workflows/mypy.yaml12
3 files changed, 42 insertions, 12 deletions
diff --git a/.flake8 b/.flake8
new file mode 100644
index 00000000..9b1f874a
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,2 @@
+[flake8]
+ignore = E501, W191, E741, E266
diff --git a/.github/workflows/lint-python.yaml b/.github/workflows/lint-python.yaml
new file mode 100644
index 00000000..6cba4705
--- /dev/null
+++ b/.github/workflows/lint-python.yaml
@@ -0,0 +1,40 @@
+on: [push, pull_request]
+name: Lint Python and Find Syntax Errors
+jobs:
+ mypy:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python mypy
+ - name: run mypy
+ run: mypy . --ignore-missing-imports
+ flake8:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python python-pip
+ - run: python -m pip install --upgrade pip
+ - run: pip install flake8
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors
+ flake8 . --count --select=E9,F63,F7 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ pytest:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python python-pip
+ - run: python -m pip install --upgrade pip
+ - run: pip install pytest
+ # TODO: Add tests and enable pytest checks.
+# - name: Test with pytest
+# run: |
+# pytest
diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml
deleted file mode 100644
index 18823a66..00000000
--- a/.github/workflows/mypy.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-on: [push, pull_request]
-name: Lint Python and Find Syntax Errors
-jobs:
- lint:
- runs-on: ubuntu-latest
- container:
- image: archlinux:latest
- steps:
- - uses: actions/checkout@v2
- - run: pacman --noconfirm -Syu python python-pip mypy
- - name: run mypy
- run: mypy . --ignore-missing-imports \ No newline at end of file