summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint.yml48
-rw-r--r--.github/workflows/linter.yml25
2 files changed, 39 insertions, 34 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index fb7f62d4a..f949c5bbc 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,52 +1,32 @@
-name: โ„๏ธ Lint
+name: Lint
on: [pull_request]
jobs:
- markdownlint:
- name: ๐Ÿธ Markdown
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: ๐Ÿš€ Use Node.js
- uses: actions/[email protected]
- with:
- node-version: '14'
- - run: npm install -g [email protected]
- - run: markdownlint '**/*.md'
misspell:
- name: ๐Ÿฅ› Check Spelling
+ name: Check Spelling
runs-on: ubuntu-latest
steps:
- - name: ๐Ÿ’ Check Out
+ - name: Check Out
uses: actions/checkout@v2
- - name: ๐Ÿ… Install
+ - name: Install
run: |
wget -O - -q https://git.io/misspell | sh -s -- -b .
- - name: ๐ŸŒถ๏ธ Misspell
+ - name: Misspell
run: |
git ls-files --empty-directory | xargs ./misspell -error
- trailing-whitespace:
- name: ๐Ÿง‹ Trailing whitespace
+ merge-conflict:
+ name: Merge Conflict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: ๐Ÿงน Check for trailing whitespace
- run: "! git grep -EIn $'[ \t]+$'"
- yamllint:
- name: ๐Ÿถ YAML
+ - name: Check merge conflict
+ run: |
+ grep "^<<<<<<< HEAD" $(git ls-files | xargs) && exit 1 || true
+ trailing-whitespace:
+ name: Trailing whitespace
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: |
- # return non-zero exit code on warnings
- yamllint --strict .
+ - name: Check for trailing whitespace
+ run: "! git grep -EIn $'[ \t]+$'"
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
new file mode 100644
index 000000000..306060c3f
--- /dev/null
+++ b/.github/workflows/linter.yml
@@ -0,0 +1,25 @@
+name: Lint Code Base
+
+on:
+ push:
+ branches-ignore: [master]
+ # Remove the line above to run when pushing to master
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ name: Lint Code Base
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: github/super-linter@v3
+ env:
+ ERROR_ON_MISSING_EXEC_BIT: true
+ VALIDATE_BASH: true
+ # VALIDATE_BASH_EXEC: true
+ # VALIDATE_EDITORCONFIG: true
+ VALIDATE_MARKDOWN: true
+ # VALIDATE_SHELL_SHFMT: true
+ VALIDATE_YAML: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}