Skip to content

Commit

Permalink
Merge pull request #3 from QuantGeekDev/feature/code-audit
Browse files Browse the repository at this point in the history
Add audit.yml github action workflow
  • Loading branch information
QuantGeekDev authored Jan 4, 2024
2 parents bab8ed5 + 9ca3bbf commit 3329ffd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
38 changes: 38 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Code audit

on: push

jobs:
audit:
runs-on: ubuntu-latest
name: Code audit

steps:
- name: ⬇ Git checkout
uses: actions/checkout@v3

- name: ❓ Check if .editorconfig exists
uses: andstor/file-existence-action@v2
with:
files: '.editorconfig'
allow_failure: true

- name: 🙈 Ensure node_modules is ignored by Git
uses: dkershner6/gitignore-parser@v2
with:
must_deny: 'node_modules'

- name: 💾 Install modules
run: npm ci

- name: 🔍 ESLint validation
run: npx eslint --ignore-path .gitignore . --max-warnings 0

- name: 📏 Check commit message length
uses: gsactions/commit-message-checker@v2
with:
pattern: '^[^#].{10,72}'
error: 'The commit message length must be between 10 and 72'
excludeDescription: 'true' # optional: this excludes the description body of a pull request
excludeTitle: 'true' # optional: this excludes the title of a pull request
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request

0 comments on commit 3329ffd

Please sign in to comment.