forked from IBM/mcp-context-forge
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (108 loc) · 4.45 KB
/
full-build-pipeline.yml
File metadata and controls
122 lines (108 loc) · 4.45 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# ===============================================================
# 🏗️ Full Build Pipeline - End-to-End Verification
# ===============================================================
#
# This workflow validates the complete build pipeline from setup
# through production Docker image creation. It runs the exact
# sequence documented in CLAUDE.md, ensuring that all integrated
# steps work together correctly.
#
# Pipeline Steps:
# 1. Environment setup (venv, dependencies)
# 2. Code quality & formatting (autoflake, isort, black, pre-commit)
# 3. Comprehensive testing & verification (doctest, test, lint-web,
# flake8, bandit, interrogate, pylint, verify)
# 4. End-to-end smoke tests
# 5. Production Docker build
#
# Triggers:
# - Every push / PR to `main`
# - Weekly scheduled run (Monday 06:00 UTC) to catch regressions
# ---------------------------------------------------------------
name: Full Build Pipeline
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
actions: read
jobs:
full-pipeline:
name: Complete Build Pipeline
runs-on: ubuntu-latest
env:
PYTHONUNBUFFERED: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
steps:
# -------------------------------------------------------------
# 0️⃣ Checkout
# -------------------------------------------------------------
- name: ⬇️ Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 1
# -------------------------------------------------------------
# 1️⃣ Set-up Python
# -------------------------------------------------------------
- name: 🐍 Setup Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: pip
# -------------------------------------------------------------
# 2️⃣ Install uv
# -------------------------------------------------------------
- name: ⚡ Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.2"
python-version: '3.11'
# -------------------------------------------------------------
# 3️⃣ Environment Setup
# -------------------------------------------------------------
- name: 🔧 Environment setup (venv, install, install-dev)
run: |
make venv install install-dev
# -------------------------------------------------------------
# 4️⃣ Code Quality & Formatting
# -------------------------------------------------------------
- name: 🎨 Code quality & formatting
run: |
make autoflake isort black
# pre-commit
# -------------------------------------------------------------
# 5️⃣ Comprehensive Testing & Verification
# -------------------------------------------------------------
- name: 🧪 Comprehensive testing & verification
run: |
make doctest test lint-web flake8 bandit interrogate pylint verify
# -------------------------------------------------------------
# 6️⃣ Smoke Tests
# -------------------------------------------------------------
- name: 🔥 End-to-end smoke tests
run: |
make smoketest
# -------------------------------------------------------------
# 7️⃣ Production Docker Build
# -------------------------------------------------------------
- name: 🐳 Production Docker build
run: |
make docker-prod
# -------------------------------------------------------------
# 8️⃣ Summary
# -------------------------------------------------------------
- name: ✅ Pipeline complete
if: success()
run: |
echo "### ✅ Full Build Pipeline Successful" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "All pipeline steps completed successfully:" >> "$GITHUB_STEP_SUMMARY"
echo "- Environment setup" >> "$GITHUB_STEP_SUMMARY"
echo "- Code quality & formatting" >> "$GITHUB_STEP_SUMMARY"
echo "- Comprehensive testing & verification" >> "$GITHUB_STEP_SUMMARY"
echo "- End-to-end smoke tests" >> "$GITHUB_STEP_SUMMARY"
echo "- Production Docker build" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "The complete build pipeline is verified and production-ready." >> "$GITHUB_STEP_SUMMARY"