Skip to content

Commit 7c0098f

Browse files
JoshLuedemanCopilot
andcommitted
🔧 Add CI workflow
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ec8c984 commit 7c0098f

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "🔧 CI"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint-and-validate:
14+
name: "✅ Lint & Validate"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Detect and Lint
21+
run: |
22+
# Terraform
23+
if ls *.tf 1>/dev/null 2>&1 || find . -name "*.tf" -maxdepth 3 | grep -q .; then
24+
echo "::group::Terraform Format Check"
25+
terraform fmt -check -recursive -diff || true
26+
echo "::endgroup::"
27+
fi
28+
29+
# Python
30+
if ls *.py 1>/dev/null 2>&1 || find . -name "*.py" -maxdepth 3 | grep -q .; then
31+
echo "::group::Python Lint"
32+
pip install ruff 2>/dev/null
33+
ruff check . || true
34+
echo "::endgroup::"
35+
fi
36+
37+
# Shell scripts
38+
if ls *.sh 1>/dev/null 2>&1 || find . -name "*.sh" -maxdepth 3 | grep -q .; then
39+
echo "::group::Shell Lint"
40+
sudo apt-get install -y shellcheck 2>/dev/null
41+
find . -name "*.sh" -maxdepth 3 -exec shellcheck {} + || true
42+
echo "::endgroup::"
43+
fi
44+
45+
# Markdown
46+
if ls *.md 1>/dev/null 2>&1; then
47+
echo "Markdown files found — consider adding markdownlint"
48+
fi
49+
50+
echo "✅ Linting complete"

0 commit comments

Comments
 (0)