-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CI): add the GitHub Super Linter
Refactor old GitHub Actions
- Loading branch information
Showing
6 changed files
with
38 additions
and
48 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,28 @@ | ||
name: ❄️ Lint | ||
name: Lint | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
markdownlint: | ||
name: 🍶 Markdown | ||
merge-conflict: | ||
name: Merge Conflict | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 🚀 Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '12.x' | ||
- run: npm install -g [email protected] | ||
- run: markdownlint '**/*.md' --ignore node_modules | ||
shellcheck: | ||
name: 🥂 Shell | ||
- name: Check merge conflict | ||
run: grep "^<<<<<<< HEAD" $(git ls-files | xargs) && exit 1 || true | ||
misspell: | ||
name: Check Spelling | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 🧹 ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
- 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 | ||
name: Trailing Whitespace | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 🧹 Check for trailing whitespace | ||
run: | | ||
cd utils || exit | ||
sh ./check-for-trailing-whitespace.sh || exit 1 | ||
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: | | ||
# return non-zero exit code on warnings | ||
yamllint --strict . | ||
- name: Check for trailing whitespace | ||
run: "! git grep -EIn $'[ \t]+$'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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_MARKDOWN: true | ||
VALIDATE_SHELL_SHFMT: true | ||
VALIDATE_YAML: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Empty file.
This file was deleted.
Oops, something went wrong.