Skip to content

Commit ae3af52

Browse files
author
Michae2xl
committed
Add CI workflow — shellcheck + syntax validation + container stats
1 parent eb7fd44 commit ae3af52

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Shellcheck install.sh
16+
uses: ludeeus/action-shellcheck@master
17+
with:
18+
scandir: './scripts'
19+
severity: warning
20+
21+
- name: Verify script syntax
22+
run: |
23+
for f in scripts/*.sh; do
24+
echo "Checking $f..."
25+
bash -n "$f" || exit 1
26+
done
27+
echo "All scripts valid ✓"
28+
29+
- name: Count containers and checks
30+
run: |
31+
containers=$(grep -c 'container_name:' scripts/install.sh)
32+
healthchecks=$(grep -c 'healthcheck:' scripts/install.sh)
33+
limits=$(grep -c 'memory:' scripts/install.sh)
34+
echo "Containers: $containers"
35+
echo "Health checks: $healthchecks"
36+
echo "Resource limits: $limits"
37+
echo "## Stats" >> $GITHUB_STEP_SUMMARY
38+
echo "- Containers: $containers" >> $GITHUB_STEP_SUMMARY
39+
echo "- Health checks: $healthchecks" >> $GITHUB_STEP_SUMMARY
40+
echo "- Resource limits: $limits" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)