Skip to content

Commit

Permalink
cache environment with python version
Browse files Browse the repository at this point in the history
  • Loading branch information
eringrant committed Jan 24, 2024
1 parent aae7c58 commit 9438603
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
bash
zsh
cache-environment: true
cache-environment-key: ${{ runner.os }}-micromamba-${{ hashFiles('environment-cpu.yml') }}
cache-environment-key: ${{ runner.os }}-micromamba-${{ matrix.python-version }}-${{ hashFiles('environment-cpu.yml') }}
cache-downloads: false
post-cleanup: "all"

Expand All @@ -61,7 +61,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-cpu.yml
cache-environment-key: ${{ runner.os }}-micromamba-${{ hashFiles('environment-cpu.yml') }}
cache-environment-key: ${{ runner.os }}-micromamba-${{ matrix.python-version }}-${{ hashFiles('environment-cpu.yml') }}

- name: Check with pre-commit
uses: pre-commit/action@v3.0.0
Expand All @@ -76,7 +76,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-cpu.yml
cache-environment-key: ${{ runner.os }}-micromamba-${{ hashFiles('environment-cpu.yml') }}
cache-environment-key: ${{ runner.os }}-micromamba-${{ matrix.python-version }}-${{ hashFiles('environment-cpu.yml') }}

- name: Test with PyTest
shell: bash -l {0}
Expand Down

0 comments on commit 9438603

Please sign in to comment.