Skip to content

Commit

Permalink
Harden primer package caching against possible race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Sep 18, 2024
1 parent 67acc96 commit 093b27f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/primer_run_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ 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
if:
steps.cache-projects.outputs.cache-hit != 'true' || (. venv/bin/activate && !
python -m pip show colorama)
run: |
. venv/bin/activate
python tests/primer/__main__.py prepare --clone
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/primer_run_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ 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
if:
steps.cache-projects.outputs.cache-hit != 'true' || (. venv/bin/activate && !
python -m pip show colorama)
run: |
. venv/bin/activate
python tests/primer/__main__.py prepare --clone
Expand Down

0 comments on commit 093b27f

Please sign in to comment.