-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (58 loc) · 1.64 KB
/
lint.yml
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
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: CC0-1.0
name: lint
on:
push:
branches: ['**']
tags: ['v*.*.*']
pull_request:
branches: [main]
jobs:
helm-chart:
runs-on: ubuntu-latest
name: Validate helm chart with linter and kubernetes yaml schemas
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install helm
uses: azure/setup-helm@v4
- name: Install go
uses: actions/setup-go@v5
- name: Install kubeconform
run: |
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Run helm dependency update
run: |
helm dependency update ./helm
- name: Run helm lint
run: |
helm lint --strict ./helm
- name: Validate chart with kubernetes schema
run: |
helm template ./helm | kubeconform -strict
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
python-version: '3.11'
- name: Install pre-commit
run: |-
python -m pip install pre-commit
- name: Install pylint
run: |-
python -m pip install pylint
- name: Run pre-commit
run: |-
pre-commit run --all-files
- name: Print changed files
if: failure()
run: |-
git add . && git status -vv