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
13 changes: 7 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
root = true

[{*,.*}]
[*]
charset = utf-8
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.sh]
end_of_line = lf
indent_size = 4

[{*.bat,*.cmd}]
end_of_line = crlf
Expand All @@ -18,7 +19,6 @@ end_of_line = lf

[*.md]
# Trailing whitespace is important in Markdown (they distinguish a new line from a new paragraph)
eclint_indent_style = unset
trim_trailing_whitespace = false

[{go.mod,go.sum,*.go,.gitmodules}]
Expand All @@ -29,7 +29,8 @@ indent_style = tab
indent_size = 4

[*.py]
profile = black

[*.sh]
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint
run-name: 'Lint: ${{ github.event_name }} on ${{ github.ref_name }}'

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
persist-credentials: false

- uses: actions/setup-python@v5
with:
python-version: '3.x'

- uses: pre-commit/action@v3.0.1
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# IDEs
.vscode/
.idea/

# AI tools
.claude/
.cursor/
.continue/
.codeium/
.codex-pre-commit-cache/

# Build & tool caches
.pre-commit-cache/
.ruff_cache/
.venv/
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: check-yaml
args: [--unsafe] # allows GitLab CI custom tags
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=500]

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [-c, .yamllint.yml]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [-s, bash] # sourced scripts have no shebang

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
hooks:
- id: ruff # linter with auto-fix
args: [--fix]
- id: ruff-format # formatter (replaces black)
39 changes: 39 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
extends: default

ignore: |
.github/workflows/cla.yaml

rules:
new-lines:
type: unix

# CI script lines are inherently long - warn only, don't fail
line-length:
max: 200
level: warning

# GitLab CI files do not use document-start marker (---)
document-start: disable

# Disable truthy key check to allow keys like "on:" in CI files
truthy:
check-keys: false

# Allow both indented (GitHub Actions) and unindented (Kubernetes) sequences
indentation:
spaces: 2
indent-sequences: consistent

# Allow single space before inline comments
comments:
min-spaces-from-content: 1

braces:
max-spaces-inside: 1

brackets:
max-spaces-inside: 1

quoted-strings:
quote-type: double
required: only-when-needed
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# qubership-test-pipelines

This repository automates the end-to-end testing qubership services in a Kubernetes cluster using Kind.
This repository automates the end-to-end testing qubership services in a Kubernetes cluster using Kind.
It implements a complete CI/CD lifecycle from infrastructure provisioning to post-deployment verification.

## Repository Structure
Expand Down Expand Up @@ -29,6 +29,25 @@ qubership-test-pipelines/
│ └── [config-name].yml
└── workflow-config/ # Workflow configurations
```
## Development

### Pre-commit hooks

This repository uses [pre-commit](https://pre-commit.com/) to enforce code quality.

#### Installation

```bash
pip install pre-commit
pre-commit install
```

#### Run against all files

```bash
pre-commit run --all-files
```

## Workflows list
Added workflow for the following services:
- [Qubership Consul](https://github.com/Netcracker/qubership-consul)
Expand Down
10 changes: 10 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
line-length = 88

[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]
Loading