Skip to content

Commit 09dfa03

Browse files
authored
Merge pull request #1 from jeremyeder/refactor/remove-fastapi-app
refactor: Convert to documentation-only reference repository
2 parents 61a87b2 + b6c8123 commit 09dfa03

30 files changed

+368
-1586
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,34 @@ on:
77
branches: [main]
88

99
jobs:
10-
lint-and-test:
10+
documentation-quality:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: ["3.11", "3.12"]
1512

1613
steps:
1714
- uses: actions/checkout@v4
1815

19-
- name: Set up Python ${{ matrix.python-version }}
16+
- name: Set up Python 3.11
2017
uses: actions/setup-python@v5
2118
with:
22-
python-version: ${{ matrix.python-version }}
23-
24-
- name: Install uv
25-
run: |
26-
curl -LsSf https://astral.sh/uv/install.sh | sh
27-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
19+
python-version: "3.11"
2820

2921
- name: Install dependencies
3022
run: |
31-
uv pip install --system -r requirements-dev.txt
32-
33-
- name: Run black
34-
run: black --check app/ tests/
35-
36-
- name: Run isort
37-
run: isort --check-only app/ tests/
23+
pip install markdownlint-cli
3824
39-
- name: Run ruff
40-
run: ruff check app/ tests/
41-
42-
- name: Run tests with coverage
43-
run: pytest --cov=app --cov-report=xml --cov-report=term-missing
44-
45-
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@v4
47-
with:
48-
files: ./coverage.xml
49-
flags: unittests
50-
name: codecov-${{ matrix.python-version }}
51-
52-
build-container:
53-
runs-on: ubuntu-latest
54-
needs: lint-and-test
55-
56-
steps:
57-
- uses: actions/checkout@v4
25+
- name: Lint markdown files
26+
run: |
27+
markdownlint docs/**/*.md README.md CLAUDE.md || true
5828
59-
- name: Build container
29+
- name: Validate Mermaid diagrams
6030
run: |
61-
podman build -t ambient-code-reference:test -f Containerfile .
31+
npm install -g @mermaid-js/mermaid-cli
32+
./scripts/validate-mermaid.sh || true
6233
63-
- name: Test container health
34+
- name: Check documentation structure
6435
run: |
65-
podman run -d --name test-app -p 8000:8000 ambient-code-reference:test
66-
sleep 5
67-
curl --fail http://localhost:8000/health || exit 1
68-
podman stop test-app
69-
podman rm test-app
36+
# Verify required documentation files exist
37+
test -f docs/quickstart.md || echo "Warning: docs/quickstart.md missing"
38+
test -f docs/architecture.md || echo "Warning: docs/architecture.md missing"
39+
test -f docs/tutorial.md || echo "Warning: docs/tutorial.md missing"
40+
test -f docs/api-reference.md || echo "Warning: docs/api-reference.md missing"

.github/workflows/security.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,22 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: "3.11"
22-
23-
- name: Install uv
18+
- name: Check for secrets in documentation
2419
run: |
25-
curl -LsSf https://astral.sh/uv/install.sh | sh
26-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
20+
# Check for common secret patterns in docs
21+
if grep -r -E '(api_key|secret|password|token).*=.*["\047][A-Za-z0-9+/]{20,}' docs/ README.md || true; then
22+
echo "Warning: Potential secrets found in documentation"
23+
fi
2724
28-
- name: Install dependencies
25+
- name: Check for hardcoded URLs with credentials
2926
run: |
30-
uv pip install --system -r requirements-dev.txt
31-
32-
- name: Run Bandit
33-
run: bandit -r app/ -f json -o bandit-report.json || true
34-
35-
- name: Upload Bandit report
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: bandit-report
39-
path: bandit-report.json
40-
41-
- name: Run Safety
42-
run: safety check --json || true
27+
if grep -r -E 'https?://[^:]+:[^@]+@' docs/ README.md || true; then
28+
echo "Warning: URLs with credentials found in documentation"
29+
fi
4330
44-
- name: Check Bandit results
31+
- name: Verify no .env files committed
4532
run: |
46-
if grep -q '"issue_severity": "HIGH"' bandit-report.json; then
47-
echo "HIGH severity security issues found"
33+
if find . -name ".env*" -not -path "./.git/*" -not -name ".env.example" | grep -q .; then
34+
echo "Error: .env files should not be committed"
4835
exit 1
4936
fi

0 commit comments

Comments
 (0)