-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: adds commitment, husky, ci gitleaks secret scanner (#3)
- Loading branch information
Showing
12 changed files
with
2,145 additions
and
36 deletions.
There are no files selected for viewing
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,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-angular"] | ||
} |
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,5 @@ | ||
{ | ||
"extends": [ | ||
"plugin:unicorn/all" | ||
] | ||
} |
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,11 @@ | ||
name: gitleaks | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
gitleaks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: gitleaks-action | ||
uses: zricethezav/gitleaks-action@master |
27 changes: 5 additions & 22 deletions
27
.github/workflows/default.yml → .github/workflows/lint.yml
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,41 +1,24 @@ | ||
name: default | ||
name: lint | ||
|
||
on: [push] | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
jobs: | ||
lint: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Full git history is needed to get a proper list of changed files within `super-linter` | ||
# Full git history is needed to get a proper list of changed files | ||
# within `super-linter` | ||
fetch-depth: 0 | ||
- uses: github/super-linter/slim@v4 | ||
env: | ||
DEFAULT_BRANCH: master | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VALIDATE_ALL_CODEBASE: true | ||
VALIDATE_JAVASCRIPT_ES: true | ||
VALIDATE_EDITORCONFIG: true | ||
VALIDATE_YAML: true | ||
VALIDATE_BASH: true | ||
VALIDATE_BASH: truea | ||
VALIDATE_BASH_EXEC: true | ||
FILTER_REGEX_EXCLUDE: CHANGELOG.md | ||
|
||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
needs: [lint] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- run: npm ci --no-production | ||
- run: npm test |
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,15 @@ | ||
name: test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- run: npm ci --no-production | ||
- run: npm test |
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,19 @@ | ||
#!/usr/bin/env sh | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;34m' | ||
NO_COLOR='\033[0m' | ||
|
||
if [ ! -f "$(dirname "$0")/_/husky.sh" ]; then | ||
printf "%bERROR%b: Pre-commit hooks not configured...\n" "$RED" "$NO_COLOR" | ||
printf '* To install pre-commit hooks run: %bnpm install%b\n' "$BLUE" "$NO_COLOR" | ||
printf '* To commit without pre-commit run: %bgit commit --no-verify%b\n' "$BLUE" "$NO_COLOR" | ||
printf '\n' | ||
fi | ||
|
||
# shellcheck disable=SC1091 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
printf "%b>>>%b Checking commit lint guidelines types...\n" "$GREEN" "$NO_COLOR" | ||
npx --no-install commitlint --edit "${1}" |
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,19 @@ | ||
#!/bin/sh | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;34m' | ||
NO_COLOR='\033[0m' | ||
|
||
if [ ! -f "$(dirname "$0")/_/husky.sh" ]; then | ||
printf "%bERROR%b: Pre-commit hooks not configured...\n" "$RED" "$NO_COLOR" | ||
printf '* To install pre-commit hooks run: %bnpm install%b\n' "$BLUE" "$NO_COLOR" | ||
printf '* To commit without pre-commit run: %bgit commit --no-verify%b\n' "$BLUE" "$NO_COLOR" | ||
printf '\n' | ||
fi | ||
|
||
# shellcheck disable=SC1091 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
printf "%b>>>%b lint...\n" "$GREEN" "$NO_COLOR" | ||
npm run lint -s |
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,22 @@ | ||
#!/bin/sh | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;34m' | ||
NO_COLOR='\033[0m' | ||
|
||
if [ ! -f "$(dirname "$0")/_/husky.sh" ]; then | ||
printf "%bERROR%b: Pre-commit hooks not configured...\n" "$RED" "$NO_COLOR" | ||
printf '* To install pre-commit hooks run: %bnpm install%b\n' "$BLUE" "$NO_COLOR" | ||
printf '* To commit without pre-commit run: %bgit commit --no-verify%b\n' "$BLUE" "$NO_COLOR" | ||
printf '\n' | ||
fi | ||
|
||
# shellcheck disable=SC1091 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
printf "%b>>>%b lint...\n" "$GREEN" "$NO_COLOR" | ||
npm run lint -s | ||
|
||
printf "%b>>>%b test...\n" "$GREEN" "$NO_COLOR" | ||
npm test |
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
Oops, something went wrong.