|
1 | 1 | # GitHub Actions Workflows |
2 | 2 |
|
3 | | -This document describes the CI/CD workflows configured for this repository. |
4 | | - |
5 | | -## Active Workflows |
6 | | - |
7 | | -### Core Development Workflows |
8 | | - |
9 | | -#### 1. CI (`ci.yml`) |
10 | | -**Triggers:** Push and PR to main/master branches |
11 | | -**Purpose:** Core continuous integration testing and quality checks |
12 | | -**Jobs:** |
13 | | -- **Format check**: Runs pre-commit hooks (black, isort, pydocstyle) |
14 | | -- **Type check and static analysis**: Runs flake8, mypy, pyright, vulture, and language policy enforcement |
15 | | -- **Changelog fragments**: Enforces changelog fragments for PRs |
16 | | -- **Tests**: Runs pytest across Python 3.9-3.13 with coverage reporting |
17 | | - |
18 | | -**Status:** ✅ Working (has legitimate doctest failures in codebase, not workflow issues) |
19 | | - |
20 | | -#### 2. Docs (`docs.yml`) |
21 | | -**Triggers:** Push and PR to main branch |
22 | | -**Purpose:** Build and validate documentation |
23 | | -**Jobs:** |
24 | | -- Build MkDocs site with strict mode |
25 | | -- Run Sphinx doctests |
26 | | -- Perform link checking |
27 | | - |
28 | | -**Status:** ✅ Working (has legitimate doctest failures in codebase, not workflow issues) |
29 | | - |
30 | | -### Security Workflows |
31 | | - |
32 | | -#### 3. Dependency Vulnerability Audit (`pip-audit.yml`) |
33 | | -**Triggers:** Push/PR to main/master, weekly schedule (Monday 5 AM UTC), manual dispatch |
34 | | -**Purpose:** Scan Python dependencies for known vulnerabilities (PyPA Advisory Database) |
35 | | -**Jobs:** |
36 | | -- Install all project dependencies |
37 | | -- Run pip-audit against installed packages |
38 | | -- Upload JSON report artifact |
39 | | -- Fail build if vulnerabilities detected |
40 | | - |
41 | | -**Status:** ✅ Working correctly |
42 | | - |
43 | | -**Note:** This is the single retained automated vulnerability scanner. It runs |
44 | | -as a CI check and never creates branches or pull requests. The previous CodeQL |
45 | | -and Bandit/Semgrep (SAST Lint) workflows and the Dependabot version-update |
46 | | -configuration were removed to eliminate automated branch/alert noise. Secret |
47 | | -scanning and push protection remain enabled at the repository settings level |
48 | | -(notification-only, no branches generated). |
49 | | - |
50 | | -### Quality Assurance Workflows |
51 | | - |
52 | | -#### 6. Reproducibility Check (`reproducibility.yml`) |
53 | | -**Triggers:** Push/PR to main/master, manual dispatch |
54 | | -**Purpose:** Verify benchmark reproducibility (TNFR canonical requirement) |
55 | | -**Jobs:** |
56 | | -- Run benchmarks twice with same seed |
57 | | -- Compare manifest checksums |
58 | | -- Verify identical results |
59 | | - |
60 | | -**Status:** ✅ Working correctly |
61 | | - |
62 | | -#### 7. Performance Regression (`performance-regression.yml`) |
63 | | -**Triggers:** PRs to main/master, manual dispatch |
64 | | -**Purpose:** Detect performance degradations |
65 | | -**Jobs:** |
66 | | -- Run performance regression test suite |
67 | | -- Mark slow tests appropriately |
68 | | - |
69 | | -**Status:** ✅ Working correctly |
70 | | - |
71 | | -#### 8. Verify Internal References (`verify-references.yml`) |
72 | | -**Triggers:** Push/PR affecting markdown/notebook files |
73 | | -**Purpose:** Validate internal documentation links |
74 | | -**Jobs:** |
75 | | -- Scan 985+ internal references |
76 | | -- Report broken links |
77 | | - |
78 | | -**Status:** ⚠️ Working but reports 75 broken links (codebase issue, not workflow) |
79 | | - |
80 | | -### Infrastructure Workflows |
81 | | - |
82 | | -#### 9. Lint Workflows (`lint-workflows.yml`) |
83 | | -**Triggers:** Push/PR affecting workflows, tools, or scripts |
84 | | -**Purpose:** Validate workflow configurations |
85 | | -**Jobs:** |
86 | | -- Check for invalid Bandit format usage (SARIF not supported) |
87 | | -- Verify bandit_to_sarif.py converter exists |
88 | | - |
89 | | -**Status:** ✅ Working correctly |
90 | | - |
91 | | -#### 10. Release (`release.yml`) |
92 | | -**Triggers:** Push to main, manual dispatch |
93 | | -**Purpose:** Automated semantic release process |
94 | | -**Jobs:** |
95 | | -- **Prepare**: Detect next version, compile changelog, apply tags |
96 | | -- **Publish**: Build distributions, sign with GPG, publish to PyPI, create GitHub release |
97 | | - |
98 | | -**Status:** ✅ Working correctly (intentionally skips when no release needed) |
99 | | - |
100 | | -## Removed Workflows |
101 | | - |
102 | | -The following workflows were removed during cleanup: |
103 | | - |
104 | | -### 1. `bandit.yml` (Removed) |
105 | | -**Reason:** Duplicate functionality - Bandit already runs in `sast-lint.yml` |
106 | | - |
107 | | -### 2. `black-duck-security-scan-ci.yml` (Removed) |
108 | | -**Reason:** Requires paid Black Duck service with configuration not available in repository |
109 | | - |
110 | | -### 3. `security-dashboard.yml` (Removed) |
111 | | -**Reason:** Optional aggregator workflow with configuration issues; individual security scans (CodeQL, SAST, pip-audit) already provide comprehensive coverage |
112 | | - |
113 | | -## Workflow Best Practices |
114 | | - |
115 | | -1. **Concurrency Control**: All workflows use `concurrency` groups with `cancel-in-progress: true` to save CI resources |
116 | | -2. **Caching**: Python dependencies and pip are cached to speed up builds |
117 | | -3. **Matrix Testing**: CI tests across Python 3.9-3.13 to ensure compatibility |
118 | | -4. **SARIF Integration**: Security workflows upload results to GitHub Security tab |
119 | | -5. **Artifact Preservation**: Important outputs (reports, logs) are uploaded as artifacts |
120 | | - |
121 | | -## Known Issues |
122 | | - |
123 | | -These issues exist in the codebase, not in workflow configurations: |
124 | | - |
125 | | -1. **Doctest Failures**: |
126 | | - - Files: `docs/source/api/api_mapping.rst`, `docs/source/how_to_reproduce_results.rst` |
127 | | - - Cause: Unexpected warnings and validation errors |
128 | | - - Impact: CI and Docs workflows report failures |
129 | | - |
130 | | -2. **Broken Documentation Links**: |
131 | | - - 75 broken internal references |
132 | | - - Common patterns: missing API pages, moved/renamed files |
133 | | - - Impact: Verify Internal References workflow reports failures |
134 | | - |
135 | | -## Maintenance Notes |
136 | | - |
137 | | -- All workflows follow TNFR canonical requirements (reproducibility, traceability, English-only) |
138 | | -- Security workflows run on schedule to catch newly disclosed vulnerabilities |
139 | | -- Release workflow requires semantic commit messages for version bumping |
140 | | -- No workflow credentials are committed to the repository (use GitHub Secrets) |
| 3 | +This page describes workflow intent. Workflow YAML is the source of truth for |
| 4 | +triggers, matrices, permissions, and commands. |
| 5 | + |
| 6 | +## Active validation |
| 7 | + |
| 8 | +| Workflow | Responsibility | |
| 9 | +| --- | --- | |
| 10 | +| `ci.yml` | Formatting, lint, advisory type analysis, changelog policy, and tests on Python 3.10-3.13 | |
| 11 | +| `docs.yml` | Internal paths and fragments, documentation integrity, strict MkDocs build, and Pages publication from main | |
| 12 | +| `verify-references.yml` | Independent internal-reference validation for Markdown changes | |
| 13 | +| `tests.yml` | Additional test execution | |
| 14 | +| `reproducibility.yml` | Repeated seeded benchmark comparison | |
| 15 | +| `performance-regression.yml` | Performance regression checks | |
| 16 | +| `pip-audit.yml` | Dependency vulnerability audit | |
| 17 | +| `release.yml` | Versioned release and publication | |
| 18 | + |
| 19 | +## Documentation publication |
| 20 | + |
| 21 | +There is one documentation build and deployment workflow: |
| 22 | + |
| 23 | +1. install the project with the `docs` extra; |
| 24 | +2. validate local Markdown targets and GitHub-style fragments; |
| 25 | +3. run executable documentation integrity checks; |
| 26 | +4. stage canonical repository sources with `scripts/prepare_docs.py`; |
| 27 | +5. build MkDocs with strict mode; |
| 28 | +6. publish the exact `site/` artifact on pushes to `main`. |
| 29 | + |
| 30 | +Pull requests build and validate the same site without publishing it. |
| 31 | + |
| 32 | +## Maintenance rules |
| 33 | + |
| 34 | +- Keep supported Python versions synchronized with `pyproject.toml`. |
| 35 | +- Keep commands in this page descriptive; copy exact command details only when |
| 36 | + they are stable public interfaces. |
| 37 | +- Treat advisory jobs as advisory in both prose and YAML. |
| 38 | +- Do not report workflow health or finding counts as permanent facts here. |
| 39 | +- Update this page when a workflow is added, removed, or changes purpose. |
0 commit comments