From d6041271950cf022599e4fdccc82ee13e507704a Mon Sep 17 00:00:00 2001 From: Seth Morton Date: Sun, 22 Nov 2020 21:41:26 -0800 Subject: Update the static analysis action --- .github/workflows/code-quality.yml | 62 ++++++++++++++++++++++++++++++++++++++ .github/workflows/superlinter.yml | 25 --------------- 2 files changed, 62 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/code-quality.yml delete mode 100644 .github/workflows/superlinter.yml 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 }} -- cgit v1.2.1