Skip to content

Commit

Permalink
Use better cache key for dependencies in tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Feb 9, 2024
1 parent d2d01f9 commit b0115e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ hashFiles('pyproject.toml', 'test/test_requirements.txt') }}

unit-tests:
name: Unit / ${{ matrix.os }}
Expand All @@ -125,7 +125,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ hashFiles('pyproject.toml', 'test/test_requirements.txt') }}

- name: Run
run: pytest --cov-report xml:coverage.xml --cov="haystack" -m "not integration" test
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ hashFiles('pyproject.toml', 'test/test_requirements.txt') }}

- name: Run
run: pytest --maxfail=5 -m "integration" test
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ hashFiles('pyproject.toml', 'test/test_requirements.txt') }}

- name: Run
run: pytest --maxfail=5 -m "integration" test -k 'not tika'
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
key: pip-${{ runner.os }}-${{ github.run_id }}-${{ hashFiles('pyproject.toml', 'test/test_requirements.txt') }}

- name: Run
run: pytest --maxfail=5 -m "integration" test -k 'not tika'
Expand Down

0 comments on commit b0115e6

Please sign in to comment.