Skip to content

Commit 1b035c8

Browse files
committed
feat: auto test
1 parent 270bcab commit 1b035c8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pr-test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test pr
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-helm
12+
13+
- name: Lint Helm charts
14+
run: |
15+
CHARTS_DIR="./template"
16+
17+
for VERSION_DIR in $(find "$CHARTS_DIR" -maxdepth 1 -type d); do
18+
if [ -f "$VERSION_DIR/ce/Chart.yaml" ] || [ -f "$VERSION_DIR/cluster/Chart.yaml" ] || [ -f "$VERSION_DIR/pro/Chart.yaml" ]; then
19+
echo "Linting charts in version directory: $VERSION_DIR"
20+
21+
if [ -f "$VERSION_DIR/ce/Chart.yaml" ]; then
22+
helm lint "$VERSION_DIR/ce"
23+
fi
24+
25+
if [ -f "$VERSION_DIR/cluster/Chart.yaml" ]; then
26+
helm lint "$VERSION_DIR/cluster"
27+
fi
28+
29+
if [ -f "$VERSION_DIR/pro/Chart.yaml" ]; then
30+
helm lint "$VERSION_DIR/pro"
31+
fi
32+
fi
33+
done

0 commit comments

Comments
 (0)