Skip to content

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

Only run pytest if Python code is affected (#9481)

Patryk Zawadzki728dbcf5b7ab
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index fb46124826..eeff70a9a6 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -7,6 +7,11 @@ on:
branches:
- main
- ci/*
+ paths:
+ - "**.py"
+ - Dockerfile
+ - requirements_dev.txt
+ - "saleor/**"
env:
BENCH_PATH: ./queries-results.json
@@ -31,13 +36,12 @@ jobs:
--health-retries 5
steps:
- - uses: actions/checkout@v2
-
+ - uses: actions/checkout@v3
- name: Install system dependencies
run: apt-get install -y libpq-dev
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_dev.txt') }}
@@ -56,7 +60,7 @@ jobs:
--junitxml=junit/test-results.xml \
--django-db-bench=${{ env.BENCH_PATH }}
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
@@ -64,8 +68,9 @@ jobs:
${{ runner.os }}-pre-commit-
# Publish coverage and test results
- - uses: codecov/codecov-action@v1
- - uses: actions/upload-artifact@v1
+ - uses: codecov/codecov-action@v2
+
+ - uses: actions/upload-artifact@v3
with:
name: pytest-results
path: junit/test-results.xml