1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- python-version : ['3.8', '3.9', '3.10', '3.11']
15+ # UPDATED: Only testing modern Python versions
16+ python-version : ['3.10', '3.11']
1617
1718 steps :
1819 - name : Checkout code
@@ -41,72 +42,50 @@ jobs:
4142 run : |
4243 # Stop the build if there are Python syntax errors or undefined names
4344 flake8 src/ app/ scripts/ --count --select=E9,F63,F7,F82 --show-source --statistics
44- # Exit -zero treats all errors as warnings
45- flake8 src/ app/ scripts/ --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
45+ # exit -zero treats all errors as warnings. The GitHub editor is 127 chars wide
46+ flake8 src/ app/ scripts/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4647
47- - name : Check code formatting with black
48+ - name : Check formatting with black
4849 run : |
4950 black --check src/ app/ scripts/
5051
5152 - name : Run tests with pytest
5253 run : |
5354 pytest tests/ -v --cov=src --cov-report=xml --cov-report=term
54-
55+
5556 - name : Upload coverage to Codecov
5657 uses : codecov/codecov-action@v3
5758 with :
5859 file : ./coverage.xml
59- flags : unittests
60- name : codecov-umbrella
6160 fail_ci_if_error : false
6261
6362 build :
64- name : Build and validate
63+ name : Build & Generate Reports
6564 runs-on : ubuntu-latest
6665 needs : test
66+ # Only run build on python 3.11 success to save resources
67+ if : success()
6768
6869 steps :
6970 - name : Checkout code
7071 uses : actions/checkout@v3
71-
72- - name : Set up Python
72+
73+ - name : Set up Python 3.11
7374 uses : actions/setup-python@v4
7475 with :
75- python-version : ' 3.10 '
76-
76+ python-version : ' 3.11 '
77+
7778 - name : Install dependencies
7879 run : |
7980 python -m pip install --upgrade pip
8081 pip install -r requirements.txt
81-
82- - name : Run data collection
83- run : |
84- python scripts/collect_data.py
85-
86- - name : Validate generated data
87- run : |
88- python -c "
89- import pandas as pd
90- from pathlib import Path
91-
92- # Check all required files exist
93- files = [
94- 'data/processed/competitive_overview.csv',
95- 'data/processed/feature_matrix.csv',
96- 'data/synthetic/traffic_estimates.csv',
97- 'data/synthetic/user_reviews.csv'
98- ]
99-
100- for f in files:
101- assert Path(f).exists(), f'Missing: {f}'
102- df = pd.read_csv(f)
103- assert len(df) > 0, f'Empty file: {f}'
104-
105- print('✅ All data files validated')
106- "
107-
108- - name : Generate reports
82+
83+ - name : Run analysis pipeline
10984 run : |
85+ # Create output directories if they don't exist (just in case)
86+ mkdir -p outputs/reports outputs/dashboards outputs/figures
87+
88+ # Run the master script
11089 python scripts/run_full_analysis.py
11190
11291 - name : Validate reports
@@ -153,10 +132,8 @@ jobs:
153132 steps :
154133 - name : Checkout code
155134 uses : actions/checkout@v3
156-
157- - name : Deploy to GitHub Pages
158- uses : peaceiris/actions-gh-pages@v3
159- with :
160- github_token : ${{ secrets.GITHUB_TOKEN }}
161- publish_dir : ./docs
162- publish_branch : gh-pages
135+
136+ # This is a placeholder for actual deployment steps
137+ # For now, it just echoes success to verify the pipeline flow
138+ - name : Deploy to GitHub Pages (Placeholder)
139+ run : echo "Documentation deployment step would go here"
0 commit comments