From 06e3dfdb573ca28e034ff9d8864ed1986cf91675 Mon Sep 17 00:00:00 2001 From: Asif Sayyed Date: Thu, 4 Jun 2026 11:44:30 +0530 Subject: [PATCH 1/3] #42 fix cache issues --- .github/workflows/theseus-engine.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/theseus-engine.yml b/.github/workflows/theseus-engine.yml index 73ca61d..fe47324 100644 --- a/.github/workflows/theseus-engine.yml +++ b/.github/workflows/theseus-engine.yml @@ -39,10 +39,19 @@ jobs: with: fetch-depth: 0 - - name: Setup Python and Poetry - uses: ./.github/actions/setup-python-poetry + - name: Set up Python + uses: actions/setup-python@v5 with: - poetry-install-args: --no-interaction --no-root + python-version: "3.12" + cache: pip + + - name: Install Poetry + run: pipx install poetry + shell: bash + + - name: Install dependencies + run: poetry install --no-interaction --no-root + shell: bash - name: Run pipeline for ${{ matrix.repo }} continue-on-error: true @@ -68,12 +77,15 @@ jobs: echo "{\"repo\": \"${{ matrix.repo }}\", \"status\": \"$STATUS\", \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" \ > /tmp/data-save/status.json + git reset --hard HEAD 2>/dev/null || true + git clean -fd 2>/dev/null || true + git fetch origin chore/monthly-data-update 2>/dev/null || true if git show-ref --verify refs/remotes/origin/chore/monthly-data-update 2>/dev/null; then git checkout chore/monthly-data-update else - git checkout --orphan chore/monthly-data-update - git rm -rf . >/dev/null 2>&1 || true + git checkout -b chore/monthly-data-update HEAD + git rm -rf --cached . >/dev/null 2>&1 || true fi mkdir -p data/raw data/processed data/.status From 9a2b50396b7b8b4201c0f1a6418b48c4f3f3019a Mon Sep 17 00:00:00 2001 From: Asif Sayyed Date: Thu, 4 Jun 2026 11:54:37 +0530 Subject: [PATCH 2/3] #42 add: pipeline status --- .github/workflows/theseus-engine.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/theseus-engine.yml b/.github/workflows/theseus-engine.yml index fe47324..82535a9 100644 --- a/.github/workflows/theseus-engine.yml +++ b/.github/workflows/theseus-engine.yml @@ -54,16 +54,16 @@ jobs: shell: bash - name: Run pipeline for ${{ matrix.repo }} + id: pipeline continue-on-error: true run: poetry run python scripts/run_pipeline.py --repo ${{ matrix.repo }} --update-survivor timeout-minutes: 120 - name: Push data to shared branch run: | - STATUS="success" + STATUS="${{ steps.pipeline.outcome == 'success' && 'success' || 'failure' }}" RAW_FILE="data/raw/${{ matrix.repo }}_data.json" GRAPH_FILE="data/processed/${{ matrix.repo }}_graph.json" - [ -f "$RAW_FILE" ] || STATUS="failure" mkdir -p /tmp/data-save From 45c0c4cbadbdaae2bdde03a834e0fda48b440644 Mon Sep 17 00:00:00 2001 From: Asif Sayyed Date: Thu, 4 Jun 2026 12:13:48 +0530 Subject: [PATCH 3/3] #42 quotes the matrix variable to prevent shell word-splitting --- .github/workflows/theseus-engine.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/theseus-engine.yml b/.github/workflows/theseus-engine.yml index 82535a9..fa2a444 100644 --- a/.github/workflows/theseus-engine.yml +++ b/.github/workflows/theseus-engine.yml @@ -56,7 +56,7 @@ jobs: - name: Run pipeline for ${{ matrix.repo }} id: pipeline continue-on-error: true - run: poetry run python scripts/run_pipeline.py --repo ${{ matrix.repo }} --update-survivor + run: poetry run python scripts/run_pipeline.py --repo "${{ matrix.repo }}" --update-survivor timeout-minutes: 120 - name: Push data to shared branch