Skip to content

Saleor Core: the high performance, composable, headless commerce API.

fix: invalid cache action usage for pre-commit (#17628)

Mikail470295f3fd3c
diff --git a/.github/workflows/tests-and-linters.yml b/.github/workflows/tests-and-linters.yml
index a9b2b97da9..15746c7282 100644
--- a/.github/workflows/tests-and-linters.yml
+++ b/.github/workflows/tests-and-linters.yml
@@ -7,7 +7,7 @@ on:
- "**.py"
- Dockerfile
- "saleor/**"
- - "tests-and-linters.yml"
+ - .github/workflows/tests-and-linters.yml
- pyproject.toml
- poetry.lock
push:
@@ -18,7 +18,7 @@ on:
- "**.py"
- Dockerfile
- "saleor/**"
- - "tests-and-linters.yml"
+ - .github/workflows/tests-and-linters.yml
- pyproject.toml
- poetry.lock
@@ -157,6 +157,13 @@ jobs:
# Ticket: https://github.com/python-poetry/poetry/issues/7190
echo "$(poetry env info -p)"/bin >> $GITHUB_PATH
+ - uses: actions/cache@v4
+ with:
+ path: ~/.cache/pre-commit
+ key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-pre-commit-
+
# Run linters and Django related checks
# `git config` command is a workaround for https://github.com/actions/runner-images/issues/6775
- name: Run Linters and Checks
@@ -164,10 +171,3 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
pre-commit run --all --show-diff-on-failure
if: ${{ always() }}
-
- - uses: actions/cache@v4
- with:
- path: ~/.cache/pre-commit
- key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
- restore-keys: |
- ${{ runner.os }}-pre-commit-