-
Notifications
You must be signed in to change notification settings - Fork 2
118 lines (99 loc) · 4.45 KB
/
curriculum-checks.yml
File metadata and controls
118 lines (99 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
name: Curriculum Checks
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
inputs:
full_smoke:
description: 'Run full smoke suite (all 165 projects)'
required: false
default: 'false'
schedule:
# Quarterly on Jan/Apr/Jul/Oct 1st at 06:00 UTC
- cron: '0 6 1 1,4,7,10 *'
jobs:
quick-checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install ruff pytest
- name: Ruff lint check
run: ruff check .
- name: Python syntax check (py_compile)
run: |
find . -name "*.py" -not -path "./.venv/*" | while read f; do
python -c "import py_compile; py_compile.compile('$f', doraise=True)" || exit 1
done
- name: Root doc contract checks (Python)
run: python tools/check_root_docs.py
- name: Level index contract checks (Python)
run: python tools/check_level_index_contract.py
- name: Project python comment/docstring contract checks (Python)
run: python tools/check_project_python_comment_contract.py
continue-on-error: true # Aspirational — many files still need comments
- name: Elite track contract checks (Python)
run: python tools/check_elite_track_contract.py
- name: Portable path contract checks
run: python tools/check_portable_paths.py
continue-on-error: true # Some concept docs use platform paths as teaching examples
- name: Modality hub link validation
run: python tools/check_modality_hubs.py
- name: Run representative pytest sample
run: |
pytest --tb=short --no-header -q \
projects/level-0/01-terminal-hello-lab/tests/ \
projects/level-1/01-input-validator-lab/tests/ \
projects/level-2/01-dictionary-lookup-service/tests/ \
projects/level-3/01-package-layout-starter/tests/ \
projects/level-4/01-schema-validator-engine/tests/ \
projects/level-5/01-schedule-ready-script/tests/ \
projects/level-6/01-sql-connection-simulator/tests/ \
projects/level-7/01-api-query-adapter/tests/ \
projects/level-8/01-dashboard-kpi-assembler/tests/ \
projects/level-9/01-architecture-decision-log/tests/ \
projects/level-10/01-enterprise-python-blueprint/tests/ \
projects/elite-track/01-algorithms-complexity-lab/tests/ \
projects/modules/01-web-scraping/01-fetch-a-webpage/tests/ \
projects/modules/02-cli-tools/01-click-basics/tests/ \
projects/modules/03-rest-apis/01-first-api-call/tests/ \
projects/modules/04-fastapi-web/01-hello-fastapi/tests/ \
projects/modules/05-async-python/01-async-basics/tests/ \
projects/modules/06-databases-orm/01-sqlite-basics/tests/ \
projects/modules/07-data-analysis/01-pandas-basics/tests/ \
projects/modules/08-testing-advanced/01-parametrize/tests/ \
projects/modules/09-docker-deployment/01-first-dockerfile/tests/ \
projects/modules/10-django-fullstack/01-django-setup/tests/ \
projects/modules/11-package-publishing/01-package-structure/tests/ \
projects/modules/12-cloud-deploy/01-deploy-to-railway/tests/ \
|| echo "Some representative tests failed — review output above"
- name: Project quick smoke checks
run: ./projects/run_smoke_checks.sh
continue-on-error: true # Some projects use different input formats
- name: Elite quick smoke checks
run: ./projects/run_elite_smoke_checks.sh
continue-on-error: true # Some projects use different input formats
full-smoke:
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.full_smoke == 'true')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install ruff pytest
- name: Full curriculum checks
run: python tools/run_all_checks.py --full