Skip to content

Commit

Permalink
Fix cache keys in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Mar 15, 2023
1 parent fb61d42 commit b8ef4eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS.
key: poetry-03022023 # use new date to reset poetry cache
key: poetry # use new date to reset poetry cache
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
Expand All @@ -28,8 +30,7 @@ jobs:
with:
path: .venv
key:
self-hosted-venv-${{ runner.os }}-${{
hashFiles('**/poetry.lock')}}-1
self-hosted-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: make setup
Expand Down Expand Up @@ -58,11 +59,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry-03022023 # increment to reset cache
path: ~/.local # the path depends on the OS.
key: poetry # use new date to reset poetry cache
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
Expand All @@ -74,8 +77,7 @@ jobs:
with:
path: .venv
key:
self-hosted-venv-${{ runner.os }}-${{
hashFiles('**/poetry.lock')}}-1
self-hosted-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: make setup
Expand All @@ -102,11 +104,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry-03022023 # increment to reset cache
path: ~/.local # the path depends on the OS.
key: poetry # use new date to reset poetry cache
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
Expand All @@ -118,8 +122,7 @@ jobs:
with:
path: .venv
key:
self-hosted-venv-${{ runner.os }}-${{
hashFiles('**/poetry.lock')}}-1
self-hosted-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: make setup
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ jobs:
with:
python-version: "3.9.13"
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS.
key: poetry-03022023 # use new date to reset poetry cache
key: poetry # use new date to reset poetry cache
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
Expand All @@ -33,8 +35,7 @@ jobs:
with:
path: .venv
key:
self-hosted-venv-${{ runner.os }}-${{
hashFiles('**/poetry.lock')}}-1
self-hosted-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: make setup
Expand Down

0 comments on commit b8ef4eb

Please sign in to comment.