diff --git a/.github/workflows/primer_run_main.yaml b/.github/workflows/primer_run_main.yaml index 03f64c4052..5bb9171803 100644 --- a/.github/workflows/primer_run_main.yaml +++ b/.github/workflows/primer_run_main.yaml @@ -78,10 +78,16 @@ jobs: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.commitstring.outputs.commitstring }}-primer - name: Regenerate cache - if: steps.cache-projects.outputs.cache-hit != 'true' + # Presence of colorama is a heuristic for the env having all packages run: | . venv/bin/activate - python tests/primer/__main__.py prepare --clone + if echo {{ steps.cache-projects.outputs.cache-hit }} | grep -c "true" && python -m pip show colorama + then + echo "Cache hit: skipping primer clone command" + else + python tests/primer/__main__.py prepare --clone + fi + shell: bash - name: Upload commit string uses: actions/upload-artifact@v4.4.0 if: matrix.batchIdx == 0 diff --git a/.github/workflows/primer_run_pr.yaml b/.github/workflows/primer_run_pr.yaml index 80aa16b311..35794813d6 100644 --- a/.github/workflows/primer_run_pr.yaml +++ b/.github/workflows/primer_run_pr.yaml @@ -147,10 +147,16 @@ jobs: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.commitstring.outputs.commitstring }}-primer - name: Regenerate cache - if: steps.cache-projects.outputs.cache-hit != 'true' + # Presence of colorama is a heuristic for the env having all packages run: | . venv/bin/activate - python tests/primer/__main__.py prepare --clone + if echo {{ steps.cache-projects.outputs.cache-hit }} | grep -c "true" && python -m pip show colorama + then + echo "Cache hit: skipping primer clone command" + else + python tests/primer/__main__.py prepare --clone + fi + shell: bash - name: Check cache run: | . venv/bin/activate