forked from kubearchive/kubearchive
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 1.83 KB
/
Copy pathstatic_code_analysis.yml
File metadata and controls
61 lines (61 loc) · 1.83 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
# Copyright KubeArchive Authors
# SPDX-License-Identifier: Apache-2.0
---
name: Static Code Analysis
run-name: Static Code Analysis
on:
push:
branches-ignore:
- main
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
go-mod-tidy:
name: go mod tidy
runs-on: ubuntu-latest
steps:
- run: |
echo "Job triggered by ${{ github.actor }}."
echo "Running on a ${{ runner.os }} server hosted by GitHub."
echo "Branch ${{ github.ref }} of repository ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run 'go mod tidy'
run: |
go mod tidy
- name: Fail if there are any changes
run: |
git diff --exit-code go.sum
git diff --exit-code go.mod
helm-lint:
name: "Helm lint"
runs-on: ubuntu-latest
steps:
- run: echo "Job triggered by ${{ github.actor }}."
- run: echo "Running on a ${{ runner.os }} server hosted by GitHub."
- run: echo "Branch ${{ github.ref }} of repository ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@v4.2.0
with:
version: latest
- name: Setup chart-testing
uses: helm/chart-testing-action@main
- name: Run chart-testing (lint)
run: ct lint --charts charts/kubearchive --config ct.yaml
- name: Run helm template
run: helm template charts/kubearchive/ --output-dir charts/generated
- name: Run yamllint
uses: karancode/yamllint-github-action@master
with:
yamllint_strict: false
yamllint_comment: false