Skip to content

Commit

Permalink
feat: add yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed May 24, 2024
1 parent c97fc1a commit 44e3bae
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_and_publish_charts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and Publish Helm Charts

on:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build_and_publish_filer.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Build and Publish Filer

on:
push:
branches: [ 'testing-gh-action' ]
tags: [ '*' ]
branches: ['testing-gh-action']
tags: ['*']

workflow_dispatch:
inputs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build_and_publish_taskmaster.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Build and Publish Taskmaster

on:
push:
branches: [ 'testing-gh-action' ]
tags: [ '*' ]
branches: ['testing-gh-action']
tags: ['*']

workflow_dispatch:
inputs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Code Quality

on:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/code_test_unit.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Code Test Unit

on:
Expand Down Expand Up @@ -30,7 +31,11 @@ jobs:
run: poetry install --only=test --no-interaction

- name: Run tests and generate coverage as test_unit.xml
run: poetry run pytest --cov-report term --cov-report xml:test_unit.xml --cov=tests/test_unit
run: |
poetry run pytest \
--cov-report term \
--cov-report xml:test_unit.xml \
--cov=tests/test_unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/validation_pr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: PR Evaluation

on:
Expand All @@ -9,7 +10,8 @@ jobs:
semantic_pr:
name: Semantic PR title
runs-on: ubuntu-latest
if: ${{ github.event.action != 'edited' || github.event.changes.title != null }}
if: ${{ github.event.action != 'edited' ||
github.event.changes.title != null }}
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
Expand All @@ -31,7 +33,8 @@ jobs:
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character & not have more than 50 characters.
doesn't start with an uppercase character & not have more than 50
characters.
detect-unresolved-conflicts:
name: Detect unresolved merge conflicts
Expand All @@ -41,5 +44,5 @@ jobs:
- uses: actions/checkout@v3
- name: List files with merge conflict markers
run: git --no-pager grep "<<<<<<<" ":(exclude).github/" || true
- name: Fail or succeed job if any files with merge conflict markers have been checked in
- name: Fail or succeed job if any files with merge conflict markers
run: exit $(git grep "<<<<<<<" ":(exclude).github/" | wc --lines)
1 change: 1 addition & 0 deletions .github/workflows/vulnerabilities.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Vulnerability Test

on:
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ repos:
deployment/charts/tesk/templates/.*\.yaml|deployment/charts/tesk/tls_secret_name\.yml-TEMPLATE
)$
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
Expand All @@ -48,11 +46,11 @@ repos:
- mdformat-frontmatter
args: [--wrap=80]
# exclude: _.+\.md|CHANGELOG\.md # Add when changelog is implemented
# - repo: https://github.com/adrienverge/yamllint.git # nice to have, but it's will change alot of files.
# rev: v1.35.1
# hooks:
# - id: yamllint
# ignore: deployment/charts
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
exclude: ^deployment/charts
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
Expand Down
20 changes: 10 additions & 10 deletions .safety-policy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: '3.0'

scanning-settings:
Expand All @@ -9,15 +10,15 @@ scanning-settings:

security:
ignore-vulnerabilities:
65213:
reason: 'Fix is downgrading the pyopenssl package to 21.0.0, doing that breaks all the test.'
expires: '2025-5-18'
67599:
reason: 'No fix available.'
expires: '2025-5-18'
70612:
reason: 'No fix available.'
expires: '2025-5-18'
65213:
reason: 'Need the pyopenssl== 21.0.0, which breaks the test.'
expires: '2025-5-18'
67599:
reason: 'No fix available.'
expires: '2025-5-18'
70612:
reason: 'No fix available.'
expires: '2025-5-18'

report:
dependency-vulnerabilities:
Expand All @@ -28,7 +29,6 @@ report:
unpinned-requirements: true
cvss-severity: []


fail-scan-with-exit-code:
dependency-vulnerabilities:
enabled: true
Expand Down
10 changes: 10 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
extends: default

ignore: |
^deployment/charts
rules:
document-start:
level: error
3 changes: 2 additions & 1 deletion docs/examples/transferPvc/pod.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: Pod
apiVersion: v1
metadata:
Expand All @@ -6,7 +7,7 @@ spec:
volumes:
- name: transfer-volume
persistentVolumeClaim:
claimName: transfer-pvc
claimName: transfer-pvc
containers:
- name: nginx-container
image: nginx
Expand Down
1 change: 1 addition & 0 deletions docs/examples/transferPvc/pv.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: PersistentVolume
apiVersion: v1
metadata:
Expand Down
1 change: 1 addition & 0 deletions docs/examples/transferPvc/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand Down

0 comments on commit 44e3bae

Please sign in to comment.