Repository navigation
47 lines (40 loc) · 1.33 KB
/
Copy pathci.yml
File metadata and controls
47 lines (40 loc) · 1.33 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
name: Code Quality CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
code-quality:
name: Validate Code Quality & Syntax
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js Environment
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Validate JavaScript Syntax
run: |
echo "Checking JavaScript files syntax..."
for file in *.js; do
if [ -f "$file" ]; then
echo "Validating $file..."
node --check "$file"
fi
done
- name: Validate HTML Structure and Resource Links
run: |
echo "Validating HTML files exist and have basic structural tags..."
for html_file in *.html; do
if [ -f "$html_file" ]; then
echo "Checking $html_file..."
grep -q -i "<html>\|<!DOCTYPE html>" "$html_file" || (echo "Missing DOCTYPE/HTML tag in $html_file" && exit 1)
fi
done
- name: Verify Documentation Files
run: |
echo "Verifying documentation files..."
test -f README.md || (echo "README.md missing" && exit 1)
test -f llms.txt || (echo "llms.txt missing" && exit 1)