Skip to content

Commit 7cc2d3d

Browse files
Hammad Haqqanicursoragent
andcommitted
Simplify CI workflow
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent dcfd3b3 commit 7cc2d3d

1 file changed

Lines changed: 21 additions & 97 deletions

File tree

.github/workflows/lint.yml

Lines changed: 21 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,48 @@
1-
name: Lint and Validate
1+
name: Validate
22

33
on:
44
push:
5-
branches: [main, develop]
5+
branches: [main]
66
pull_request:
77
branches: [main]
8-
workflow_dispatch:
98

109
jobs:
11-
shellcheck:
12-
name: Shell Script Linting
10+
validate:
11+
name: Validate Structure
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v4
16-
17-
- name: Run ShellCheck
18-
uses: ludeeus/action-shellcheck@master
19-
with:
20-
scandir: 'scripts'
21-
format: gcc
22-
severity: error
2315

24-
yaml-lint:
25-
name: YAML Linting
26-
runs-on: ubuntu-latest
27-
steps:
28-
- uses: actions/checkout@v4
29-
30-
- name: Run yamllint
31-
uses: karancode/yamllint-github-action@v2.3.1
32-
with:
33-
yamllint_file_or_dir: '.'
34-
yamllint_strict: false
35-
yamllint_comment: true
36-
37-
markdown-lint:
38-
name: Markdown Linting
39-
runs-on: ubuntu-latest
40-
steps:
41-
- uses: actions/checkout@v4
42-
43-
- name: Run markdownlint
44-
uses: DavidAnson/markdownlint@v3
45-
with:
46-
globs: |
47-
**/*.md
48-
!node_modules/**
16+
- name: Check required files
17+
run: |
18+
for f in README.md LICENSE .gitignore; do
19+
test -f "$f" || { echo "Missing $f"; exit 1; }
20+
done
21+
echo "All required files present"
4922
50-
json-validate:
51-
name: JSON Validation
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
5623
- name: Validate JSON files
5724
run: |
5825
find . -name "*.json" -not -path "./.git/*" | while read -r file; do
5926
echo "Validating $file"
6027
python3 -m json.tool "$file" > /dev/null || exit 1
6128
done
29+
echo "All JSON files valid"
6230
63-
file-structure:
64-
name: Validate File Structure
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@v4
68-
69-
- name: Check required files exist
31+
- name: Check scripts are executable
7032
run: |
71-
required_files=(
72-
"README.md"
73-
"LICENSE"
74-
".gitignore"
75-
"templates/terraform/CLAUDE.md"
76-
"templates/kubernetes/CLAUDE.md"
77-
"templates/python/CLAUDE.md"
78-
"templates/cicd/CLAUDE.md"
79-
"prompts/iac-generation.md"
80-
"prompts/debugging.md"
81-
"prompts/migration.md"
82-
"prompts/security-review.md"
83-
"scripts/setup-claude-project.sh"
84-
"scripts/bulk-review.sh"
85-
"scripts/generate-docs.sh"
86-
)
87-
88-
missing_files=()
89-
for file in "${required_files[@]}"; do
90-
if [[ ! -f "$file" ]]; then
91-
missing_files+=("$file")
92-
fi
33+
for f in scripts/*.sh; do
34+
test -x "$f" || { echo "$f is not executable"; exit 1; }
9335
done
94-
95-
if [[ ${#missing_files[@]} -gt 0 ]]; then
96-
echo "Missing required files:"
97-
printf ' - %s\n' "${missing_files[@]}"
98-
exit 1
99-
fi
100-
101-
echo "All required files present"
36+
echo "All scripts executable"
10237
103-
scripts-executable:
104-
name: Check Scripts are Executable
38+
shellcheck:
39+
name: ShellCheck
10540
runs-on: ubuntu-latest
10641
steps:
10742
- uses: actions/checkout@v4
108-
109-
- name: Check script permissions
43+
- name: Run ShellCheck
11044
run: |
111-
scripts=(
112-
"scripts/setup-claude-project.sh"
113-
"scripts/bulk-review.sh"
114-
"scripts/generate-docs.sh"
115-
)
116-
117-
for script in "${scripts[@]}"; do
118-
if [[ ! -x "$script" ]]; then
119-
echo "Script $script is not executable"
120-
exit 1
121-
fi
45+
for f in scripts/*.sh; do
46+
echo "Checking $f"
47+
shellcheck -S error "$f" || exit 1
12248
done
123-
124-
echo "All scripts are executable"

0 commit comments

Comments
 (0)