|
7 | 7 | branches: [main] |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - lint-and-test: |
| 10 | + documentation-quality: |
11 | 11 | runs-on: ubuntu-latest |
12 | | - strategy: |
13 | | - matrix: |
14 | | - python-version: ["3.11", "3.12"] |
15 | 12 |
|
16 | 13 | steps: |
17 | 14 | - uses: actions/checkout@v4 |
18 | 15 |
|
19 | | - - name: Set up Python ${{ matrix.python-version }} |
| 16 | + - name: Set up Python 3.11 |
20 | 17 | uses: actions/setup-python@v5 |
21 | 18 | 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" |
28 | 20 |
|
29 | 21 | - name: Install dependencies |
30 | 22 | 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 |
38 | 24 |
|
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 |
58 | 28 |
|
59 | | - - name: Build container |
| 29 | + - name: Validate Mermaid diagrams |
60 | 30 | 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 |
62 | 33 |
|
63 | | - - name: Test container health |
| 34 | + - name: Check documentation structure |
64 | 35 | 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" |
0 commit comments