Skip to content

Commit 1b8e150

Browse files
Pigbibicodex
andcommitted
fix: isolate weekly manifest artifact upload
Co-Authored-By: Codex <noreply@openai.com>
1 parent 38376f5 commit 1b8e150

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/rss_source_pipeline.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ jobs:
160160
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
161161
with:
162162
name: rss-source-pipeline
163-
path: data/output/rss_source_pipeline/
163+
path: |
164+
data/output/rss_source_pipeline/source_items.csv
165+
data/output/rss_source_pipeline/source_events.csv
166+
data/output/rss_source_pipeline/source_tracker.csv
167+
data/output/rss_source_pipeline/source_fetch_status.json
164168
if-no-files-found: error
165169
- name: Upload weekly contract artifact
166170
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7

tests/test_weekly_producer_workflow.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import re
12
from pathlib import Path
23

34

@@ -16,6 +17,17 @@ def test_weekly_workflow_uses_pinned_actions_and_explicit_contract_inputs() -> N
1617
assert "retention-days: 30" in text
1718
assert "if-no-files-found: error" in text
1819
assert 'cron: "15 0 * * 1"' in text
20+
upload_steps = re.findall(r"^ - name: Upload.*?(?=^ - name:|\Z)", text, re.MULTILINE | re.DOTALL)
21+
assert len(upload_steps) == 2
22+
broad, dedicated = upload_steps
23+
assert "weekly_manifest.json" not in broad
24+
assert "source_items.csv" in broad
25+
assert "source_events.csv" in broad
26+
assert "source_tracker.csv" in broad
27+
assert "source_fetch_status.json" in broad
28+
assert dedicated.count("weekly_manifest.json") == 1
29+
assert "name: political-event-weekly-v1" in dedicated
30+
assert "path: data/output/rss_source_pipeline/weekly-artifact/weekly_manifest.json" in dedicated
1931
for line in text.splitlines():
2032
if "uses: actions/" in line:
2133
assert len(line.split("@", 1)[1].split()[0]) == 40

0 commit comments

Comments
 (0)