summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Morton <seth.m.morton@gmail.com>2020-11-22 21:41:26 -0800
committerSeth Morton <seth.m.morton@gmail.com>2020-11-22 21:41:26 -0800
commitd6041271950cf022599e4fdccc82ee13e507704a (patch)
tree5fcfa64f4ba26c628085f04a31d2cd4166927951
parent4a1f5d1f066981a978570e080a315e14eb901593 (diff)
downloadnatsort-d6041271950cf022599e4fdccc82ee13e507704a.tar.gz
Update the static analysis action
-rw-r--r--.github/workflows/code-quality.yml62
-rw-r--r--.github/workflows/superlinter.yml25
2 files changed, 62 insertions, 25 deletions
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
new file mode 100644
index 0000000..5c28abe
--- /dev/null
+++ b/.github/workflows/code-quality.yml
@@ -0,0 +1,62 @@
+name: Code Quality
+
+# Run this workflow every time a new commit pushed to your repository
+on: push
+
+jobs:
+ formatting:
+ name: Formatting
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.6'
+
+ - name: Install black
+ run: pip install black
+
+ - name: Run black
+ run: black --quiet --check --diff .
+
+ static-analysis:
+ name: Static Analysis
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.5'
+
+ - name: Install Flake8
+ run: pip install flake8 flake8-import-order flake8-bugbear pep8-naming
+
+ - name: Run Flake8
+ run: flake8
+
+ package-validation:
+ name: Package Validation
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.5'
+
+ - name: Install Validators
+ run: pip install twine check-manifest
+
+ - name: Run Validation
+ run: |
+ check-manifest --ignore ".github*,*.md,.coveragerc"
+ python setup.py sdist
+ twine check dist/*
diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml
deleted file mode 100644
index ba72be1..0000000
--- a/.github/workflows/superlinter.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Super-Linter
-
-# Run this workflow every time a new commit pushed to your repository
-on: push
-
-jobs:
- # Set the job key. The key is displayed as the job name
- # when a job name is not provided
- super-lint:
- # Name the Job
- name: Static Analysis
- # Set the type of machine to run on
- runs-on: ubuntu-latest
-
- steps:
- # Checks out a copy of your repository on the ubuntu-latest machine
- - name: Checkout code
- uses: actions/checkout@v2
-
- # Runs the Super-Linter action
- - name: Run Super-Linter
- uses: github/super-linter@v3
- env:
- DEFAULT_BRANCH: master
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}