-
Notifications
You must be signed in to change notification settings - Fork 9
147 lines (130 loc) · 4.73 KB
/
Copy pathlint.yml
File metadata and controls
147 lines (130 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Copyright 2025 AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
---
name: lint
on:
push:
# Run superlinter on pushes to default branch
branches:
- main
# Run superlinter on pull request events
pull_request:
# Declare default permissions as read-only
permissions: read-all
jobs:
super-linter:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
with:
fetch-depth: 0
- name: 🧹 run superlinter
uses: super-linter/super-linter@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: ".github/linters"
MARKDOWN_CONFIG_FILE: ".markdownlint.yml"
YAML_CONFIG_FILE: ".yamllint.yml"
GO_CONFIG_FILE: ".golangci.yaml"
PROTOBUF_CONFIG_FILE: ".protolintrc.yml"
TRIVY_CONFIG_FILE: ".trivy.yml"
FILTER_REGEX_EXCLUDE: "(.*/charts/.*)|(sdk/python/agntcy/.*)|(sdk/python/google/.*)|(sdk/python/openapiv3/.*)|(samples/.*)|(docs/contribute/wip/.*)"
VALIDATE_ALL_CODEBASE: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_JSCPD: false
VALIDATE_CHECKOV: false
VALIDATE_GO: false
VALIDATE_ENV: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_RUFF: false
VALIDATE_PYTHON_RUFF_FORMAT: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_PYINK: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_FLAKE8: false
MULTI_STATUS: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_CSS: false
VALIDATE_CSS_PRETTIER: false
VALIDATE_TYPESCRIPT_STANDARD: false
VALIDATE_TYPESCRIPT_ES: false
VALIDATE_TSX: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_BIOME_LINT: false
VALIDATE_BIOME_FORMAT: false
helm-lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
- name: Set up Helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v3
with:
version: 'v3.14.0'
- name: Build Helm Dependencies
run: |
echo "Adding Helm repositories..."
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add hashicorp https://helm.releases.hashicorp.com
helm repo update
echo "Building Helm dependencies..."
find ./charts -name Chart.yaml -exec dirname {} \; | while read -r chart_dir; do
echo "Building dependencies for: $chart_dir"
helm dependency build "$chart_dir"
done
- name: Lint Helm Charts
run: |
echo "Linting Helm charts..."
find ./charts -name Chart.yaml -exec dirname {} \; | while read -r chart_dir; do
echo "Linting chart: $chart_dir"
helm lint "$chart_dir"
done
- name: Validate Templates
run: |
echo "Validating Helm templates..."
find ./charts -name Chart.yaml -exec dirname {} \; | while read -r chart_dir; do
echo "Validating templates in: $chart_dir"
helm template "$chart_dir" > /dev/null
done
python-lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
- name: Set up python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install Identity SDK dependencies and lint toolings
working-directory: ./sdk/python
run: |
pip install ".[test]"
pip install ".[lint]"
- name: Running RUFF linter
working-directory: ./sdk/python
run: ruff --config pyproject.toml check .
- name: Running RUFF formatter
working-directory: ./sdk/python
run: ruff --config pyproject.toml format --check
- name: Running PYLINT
working-directory: ./sdk/python
run: pylint .
- name: Running MYPY
working-directory: ./sdk/python
run: |
echo "Remove unsued imports related to protoc_gen_openapiv2"
ruff check --select F401 agntcy --fix
echo "Running mypy on identityservice/"
mypy identityservice/
echo "Running mypy on tests/"
mypy tests/