-
-
Notifications
You must be signed in to change notification settings - Fork 12
121 lines (100 loc) · 2.88 KB
/
ci.yaml
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
name: CI Pipeline
on:
push:
branches:
- master
- main
pull_request_target:
types: [ opened, synchronize, reopened, ready_for_review ]
permissions: read-all
jobs:
build:
name: Build & Validate
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3.4.2
- name: Build
uses: gradle/gradle-build-action@v3.5.0
with:
arguments: build jacocoTestReport -i
- name: Report coverage
uses: codecov/codecov-action@v4
with:
name: branch-${{ github.ref }}
verbose: true
fail_ci_if_error: false
- name: Run codacy coverage reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
- uses: actions/upload-artifact@v4.4.0
with:
name: Build Artifacts
path: |
**/build/reports
lint-test-helm:
name: Lint & Test chart
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.10.0
- uses: actions/setup-python@v5
with:
python-version: '3.9'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --config .github/ct.yaml
- name: Create kind cluster
uses: helm/kind-action@v1.10.0
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install
docs-test:
name: Test documentation
runs-on: ubuntu-latest
needs:
- lint-test-helm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install \
mkdocs-material \
mkdocs-git-revision-date-localized-plugin
- name: Build documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m mkdocs build