chore!: Rewrite Lint Workflow to Github (#685)
* feat: Move Linting to Github Actions Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Disable ServiceAccount on disabled Dex Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Swap Linting to Github Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Increase all chart versions Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Remove Circle & Improve Github Lint Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Remove Circle & Improve Github Lint Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Lookup Configmaps update Retest Retest reduce changes reduce changes * Bump argo-events Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Move Config files Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Readd Lint & Remove Argo Chart Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Correct CT config name Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Readd ARgo Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
parent
b971b36317
commit
35c754364f
10 changed files with 79 additions and 30 deletions
17
.github/ct.yaml
vendored
Normal file
17
.github/ct.yaml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md
|
||||
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore
|
||||
remote: origin
|
||||
chart-dirs:
|
||||
- charts
|
||||
chart-repos:
|
||||
- argo=https://argoproj.github.io/argo-helm
|
||||
- minio=https://helm.min.io/
|
||||
- dandydeveloper=https://dandydeveloper.github.io/charts/
|
||||
- stable=https://charts.helm.sh/stable
|
||||
- incubator=https://charts.helm.sh/incubator
|
||||
helm-extra-args: "--timeout 600s"
|
||||
validate-chart-schema: false
|
||||
validate-maintainers: true
|
||||
validate-yaml: true
|
||||
exclude-deprecated: true
|
||||
excluded-charts: []
|
||||
42
.github/lintconf.yaml
vendored
Normal file
42
.github/lintconf.yaml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
rules:
|
||||
braces:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
min-spaces-inside-empty: -1
|
||||
max-spaces-inside-empty: -1
|
||||
brackets:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
min-spaces-inside-empty: -1
|
||||
max-spaces-inside-empty: -1
|
||||
colons:
|
||||
max-spaces-before: 0
|
||||
max-spaces-after: 1
|
||||
commas:
|
||||
max-spaces-before: 0
|
||||
min-spaces-after: 1
|
||||
max-spaces-after: 1
|
||||
comments:
|
||||
require-starting-space: true
|
||||
min-spaces-from-content: 1
|
||||
document-end: disable
|
||||
document-start: disable # No --- to start a file
|
||||
empty-lines:
|
||||
max: 2
|
||||
max-start: 0
|
||||
max-end: 0
|
||||
hyphens:
|
||||
max-spaces-after: 1
|
||||
indentation:
|
||||
spaces: consistent
|
||||
indent-sequences: whatever # - list indentation will handle both indentation and without
|
||||
check-multi-line-strings: false
|
||||
key-duplicates: enable
|
||||
line-length: disable # Lines can be any length
|
||||
new-line-at-end-of-file: enable
|
||||
new-lines:
|
||||
type: unix
|
||||
trailing-spaces: enable
|
||||
truthy:
|
||||
level: warning
|
||||
1
.github/stale.yml
vendored
1
.github/stale.yml
vendored
|
|
@ -1 +0,0 @@
|
|||
# See https://github.com/probot/stale
|
||||
45
.github/workflows/lint-and-test.yml
vendored
Normal file
45
.github/workflows/lint-and-test.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
## Reference: https://github.com/helm/chart-testing-action
|
||||
---
|
||||
name: Linting and Testing
|
||||
on: pull_request
|
||||
jobs:
|
||||
chart-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v1
|
||||
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Setup Chart Linting
|
||||
id: lint
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
- name: List changed charts
|
||||
id: list-changed
|
||||
run: |
|
||||
## If executed with debug this won't work anymore.
|
||||
changed=$(ct --config ./.github/ct.yaml list-changed)
|
||||
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
|
||||
if [[ -n "$changed" ]]; then
|
||||
echo "::set-output name=changed::true"
|
||||
echo "::set-output name=changed_charts::$charts"
|
||||
fi
|
||||
- name: Run chart-testing (lint)
|
||||
run: ct lint --debug --config ./.github/ct.yaml --lint-conf ./.github/lintconf.yaml
|
||||
|
||||
- name: Create kind cluster
|
||||
uses: helm/kind-action@v1.1.0
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ./.github/ct.yaml
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
|
|
@ -1,14 +1,10 @@
|
|||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue