Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: pre-commit

on:
pull_request:

permissions:
contents: read

jobs:
pre-commit:
name: Run pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.1
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
types: [yaml]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer

- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint-docker
types: [dockerfile]
args: [--ignore, DL3007, --ignore, DL3025, --ignore, DL3062]

- repo: local
hooks:
- id: circleci-validate
name: CircleCI pipeline validation
language: system
entry: bash -c 'for file in "$@"; do circleci config validate --org-slug github/lightspeedretail "$file"; done' --
pass_filenames: true
files: ^.circleci/.*\.yml$

- id: helm-lint
name: Helm lint (api-server chart)
language: system
files: ^api-server/charts/.*\.ya?ml$
pass_filenames: false
entry: helm lint api-server/charts

- id: helm-template
name: Helm template (api-server chart, all envs)
language: script
files: ^api-server/charts/.*\.ya?ml$
pass_filenames: false
entry: api-server/scripts/check-helm-charts.sh
17 changes: 17 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
extends: default

ignore: |
node_modules/
vendor/
charts/
rules:
line-length:
max: 120
level: warning
ignore:
- .circleci/*.yml
braces:
min-spaces-inside: 0
max-spaces-inside: 2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`convertReadmeToHelp when able to get readme and able to parse readme provides an help message 1`] = `
"Here's a list of available commands :information_desk_person:
"Here's a list of available commands :information_desk_person:

:point_right: _*Hello*_
Some details about hello command
Expand Down
Loading