|
@ -1,89 +0,0 @@ |
|
|
name: Lint |
|
|
|
|
|
|
|
|
|
|
|
on: |
|
|
|
|
|
workflow_dispatch: |
|
|
|
|
|
inputs: |
|
|
|
|
|
logLevel: |
|
|
|
|
|
description: 'Log level' |
|
|
|
|
|
required: true |
|
|
|
|
|
default: 'warning' |
|
|
|
|
|
tags: |
|
|
|
|
|
description: 'Perform Lint Check' |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
|
flake8: |
|
|
|
|
|
name: Flake8 |
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
strategy: |
|
|
|
|
|
matrix: |
|
|
|
|
|
python-version: [3.8] |
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
|
|
|
|
uses: actions/setup-python@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
python-version: ${{ matrix.python-version }} |
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
|
run: | |
|
|
|
|
|
python -m pip install --upgrade pip |
|
|
|
|
|
pip install flake8 |
|
|
|
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
|
|
|
|
|
- name: Lint with flake8 |
|
|
|
|
|
run: | |
|
|
|
|
|
# stop the build if there are Python syntax errors or undefined names |
|
|
|
|
|
flake8 . --count --ignore=E201,E501,W605 --show-source --statistics |
|
|
|
|
|
markdownlint: |
|
|
|
|
|
runs-on: ${{ matrix.os }} |
|
|
|
|
|
strategy: |
|
|
|
|
|
matrix: |
|
|
|
|
|
os: |
|
|
|
|
|
- ubuntu-latest |
|
|
|
|
|
node_version: |
|
|
|
|
|
- 14 |
|
|
|
|
|
architecture: |
|
|
|
|
|
- x64 |
|
|
|
|
|
name: Markdown Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} |
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
- name: Setup node |
|
|
|
|
|
uses: actions/setup-node@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
node-version: ${{ matrix.node_version }} |
|
|
|
|
|
architecture: ${{ matrix.architecture }} |
|
|
|
|
|
- run: npm install -g markdownlint-cli@0.27.1 |
|
|
|
|
|
- run: markdownlint '**/*.md' |
|
|
|
|
|
misspell: |
|
|
|
|
|
name: Check Spelling |
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
steps: |
|
|
|
|
|
- name: Check Out |
|
|
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
- name: Install |
|
|
|
|
|
run: | |
|
|
|
|
|
wget -O - -q https://git.io/misspell | sh -s -- -b . |
|
|
|
|
|
- name: Misspell |
|
|
|
|
|
run: | |
|
|
|
|
|
git ls-files --empty-directory | xargs ./misspell -error |
|
|
|
|
|
trailing-whitespace: |
|
|
|
|
|
name: Trailing whitespace |
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
- name: Check for trailing whitespace |
|
|
|
|
|
run: "! git grep -EIn $'[ \t]+$'" |
|
|
|
|
|
yamllint: |
|
|
|
|
|
name: YAML |
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
- uses: actions/setup-python@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax |
|
|
|
|
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified |
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
|
run: | |
|
|
|
|
|
python -m pip install --upgrade pip |
|
|
|
|
|
pip install yamllint |
|
|
|
|
|
- name: YAML Lint |
|
|
|
|
|
run: | |
|
|
|
|
|
yamllint --strict . |
|
|
|