Skip to content

Commit a8e461c

Browse files
Upgrade GitHub Actions to v4 to fix deprecation error
1 parent 1ded8ac commit a8e461c

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
# UPDATED: Only testing modern Python versions
1615
python-version: ['3.10', '3.11']
1716

1817
steps:
1918
- name: Checkout code
20-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4 # UPDATED: v3 -> v4
2120

2221
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5 # UPDATED: v4 -> v5
2423
with:
2524
python-version: ${{ matrix.python-version }}
2625

2726
- name: Cache pip packages
28-
uses: actions/cache@v3
27+
uses: actions/cache@v4 # UPDATED: v3 -> v4
2928
with:
3029
path: ~/.cache/pip
3130
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
@@ -40,9 +39,7 @@ jobs:
4039
4140
- name: Lint with flake8
4241
run: |
43-
# Stop the build if there are Python syntax errors or undefined names
4442
flake8 src/ app/ scripts/ --count --select=E9,F63,F7,F82 --show-source --statistics
45-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4643
flake8 src/ app/ scripts/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4744
4845
- name: Check formatting with black
@@ -54,7 +51,7 @@ jobs:
5451
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term
5552
5653
- name: Upload coverage to Codecov
57-
uses: codecov/codecov-action@v3
54+
uses: codecov/codecov-action@v4
5855
with:
5956
file: ./coverage.xml
6057
fail_ci_if_error: false
@@ -63,15 +60,14 @@ jobs:
6360
name: Build & Generate Reports
6461
runs-on: ubuntu-latest
6562
needs: test
66-
# Only run build on python 3.11 success to save resources
6763
if: success()
6864

6965
steps:
7066
- name: Checkout code
71-
uses: actions/checkout@v3
67+
uses: actions/checkout@v4 # UPDATED: v3 -> v4
7268

7369
- name: Set up Python 3.11
74-
uses: actions/setup-python@v4
70+
uses: actions/setup-python@v5 # UPDATED: v4 -> v5
7571
with:
7672
python-version: '3.11'
7773

@@ -82,42 +78,35 @@ jobs:
8278
8379
- name: Run analysis pipeline
8480
run: |
85-
# Create output directories if they don't exist (just in case)
8681
mkdir -p outputs/reports outputs/dashboards outputs/figures
87-
88-
# Run the master script
8982
python scripts/run_full_analysis.py
9083
9184
- name: Validate reports
9285
run: |
9386
python -c "
9487
from pathlib import Path
95-
96-
# Check all reports exist
9788
reports = [
9889
'outputs/reports/competitive_analysis_summary.txt',
9990
'outputs/reports/market_sizing_report.txt',
10091
'outputs/reports/pricing_strategy_recommendation.txt',
10192
'outputs/reports/gtm_strategy_report.txt',
10293
'outputs/reports/financial_model_report.txt'
10394
]
104-
10595
for r in reports:
10696
assert Path(r).exists(), f'Missing report: {r}'
10797
assert Path(r).stat().st_size > 1000, f'Report too small: {r}'
108-
10998
print('✅ All reports validated')
11099
"
111100
112101
- name: Archive reports
113-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4 # UPDATED: v3 -> v4 (The one causing your error)
114103
with:
115104
name: gtm-reports
116105
path: outputs/reports/
117106
retention-days: 30
118107

119108
- name: Archive dashboards
120-
uses: actions/upload-artifact@v3
109+
uses: actions/upload-artifact@v4 # UPDATED: v3 -> v4
121110
with:
122111
name: gtm-dashboards
123112
path: outputs/dashboards/
@@ -131,9 +120,7 @@ jobs:
131120

132121
steps:
133122
- name: Checkout code
134-
uses: actions/checkout@v3
123+
uses: actions/checkout@v4 # UPDATED: v3 -> v4
135124

136-
# This is a placeholder for actual deployment steps
137-
# For now, it just echoes success to verify the pipeline flow
138125
- name: Deploy to GitHub Pages (Placeholder)
139126
run: echo "Documentation deployment step would go here"

0 commit comments

Comments
 (0)