Skip to content

Commit

Permalink
feat: Add custom pipelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
yonas committed Nov 23, 2024
1 parent 17562cd commit d81668d
Show file tree
Hide file tree
Showing 8 changed files with 475 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
18 changes: 17 additions & 1 deletion .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]

name: SonarQube Security
name: Security Scanner
jobs:
analysis:
runs-on: ubuntu-latest
Expand All @@ -22,3 +22,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Trufflehog
run: task audit:secrets

vulnerabilities:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Trivy
run: task audit:vulnerabilities
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/

Expand All @@ -8,3 +7,12 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# Taskfile checksums
.task/

# Pipelight logs
.pipelight/

# Documentation builds
build/output/
79 changes: 79 additions & 0 deletions .goji.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"noemoji": false,
"scopes": [
"home",
"accounts",
"ci"
],
"signoff": true,
"skipquestions": null,
"subjectmaxlength": 100,
"types": [
{
"emoji": "",
"code": ":sparkles:",
"description": "Introduce new features.",
"name": "feat"
},
{
"emoji": "🐛",
"code": ":bug:",
"description": "Fix a bug.",
"name": "fix"
},
{
"emoji": "📚",
"code": ":books:",
"description": "Documentation change.",
"name": "docs"
},
{
"emoji": "🎨",
"code": ":art:",
"description": "Improve structure/format of the code.",
"name": "refactor"
},
{
"emoji": "🧹",
"code": ":broom:",
"description": "A chore change.",
"name": "chore"
},
{
"emoji": "🧪",
"code": ":test_tube:",
"description": "Add a test.",
"name": "test"
},
{
"emoji": "🚑️",
"code": ":ambulance:",
"description": "Critical hotfix.",
"name": "hotfix"
},
{
"emoji": "⚰️",
"code": ":coffin:",
"description": "Remove dead code.",
"name": "deprecate"
},
{
"emoji": "⚡️",
"code": ":zap:",
"description": "Improve performance.",
"name": "perf"
},
{
"emoji": "🚧",
"code": ":construction:",
"description": "Work in progress.",
"name": "wip"
},
{
"emoji": "📦",
"code": ":package:",
"description": "Add or update compiled files or packages.",
"name": "package"
}
]
}
36 changes: 36 additions & 0 deletions .lefthook.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[pre-commit]
parallel = true

[pre-commit.commands.lint]
run = "just --timestamp lint"
glob = "*.go"
stage_fixed = true

[pre-commit.commands.format]
run = "just --timestamp format"
glob = "*.go"
stage_fixed = true

[pre-commit.commands.build]
run = "just --timestamp build"
glob = "*.go"

[pre-commit.commands.audit]
run = "just --timestamp audit"

[pre-commit.commands.cog-check]
run = "cog check"

#[commit-msg.commands.cog-verify]
#run = "cog verify -i '{1}'"

# Build commit message
[prepare-commit-msg.commands.commitzen]
interactive = true
run = "just --timestamp prepare-commit-msg {1}"
[commit-msg.commands.commitzen.env]
LEFTHOOK = 0

# Validate commit messages
[commit-msg.commands.commitzen]
run = "just --timestamp lint-commit-msg {1}"
Loading

0 comments on commit d81668d

Please sign in to comment.