1717 - ' poetry.lock'
1818 - ' pyproject.toml'
1919 pull_request :
20- paths :
21- - ' airbyte_cdk/**'
22- - ' unit_tests/**'
23- - ' poetry.lock'
24- - ' pyproject.toml'
2520
2621jobs :
2722 pytest :
@@ -52,21 +47,35 @@ jobs:
5247 # Common steps:
5348 - name : Checkout code
5449 uses : actions/checkout@v4
50+ - id : changes
51+ 52+ with :
53+ filters : |
54+ src:
55+ - 'airbyte_cdk/**'
56+ - 'unit_tests/**'
57+ - 'bin/**'
58+ - 'poetry.lock'
59+ - 'pyproject.toml'
5560 - name : Set up Poetry
5661 uses : Gr1N/setup-poetry@v9
62+ if : steps.changes.outputs.src == 'true'
5763 with :
5864 poetry-version : " 1.7.1"
5965 - name : Set up Python
6066 uses : actions/setup-python@v5
67+ if : steps.changes.outputs.src == 'true'
6168 with :
6269 python-version : ${{ matrix.python-version }}
6370 cache : " poetry"
6471 - name : Install dependencies
72+ if : steps.changes.outputs.src == 'true'
6573 run : poetry install --all-extras
6674
6775 # Job-specific step(s):
6876 - name : Run Pytest
6977 timeout-minutes : 60
78+ if : steps.changes.outputs.src == 'true'
7079 env :
7180 GCP_GSM_CREDENTIALS : ${{ secrets.GCP_GSM_CREDENTIALS }}
7281 run : >
@@ -75,17 +84,17 @@ jobs:
7584 -m "not linting and not super_slow and not flaky"
7685
7786 - name : Print Coverage Report
78- if : always()
87+ if : always() && steps.changes.outputs.src == 'true'
7988 run : poetry run coverage report
8089
8190 - name : Create Coverage Artifacts
82- if : always()
91+ if : always() && steps.changes.outputs.src == 'true'
8392 run : |
8493 poetry run coverage html -d htmlcov
8594 poetry run coverage xml -o htmlcov/coverage.xml
8695
8796 - name : Upload coverage to GitHub Artifacts
88- if : always()
97+ if : always() && steps.changes.outputs.src == 'true'
8998 uses : actions/upload-artifact@v4
9099 with :
91100 name : py${{ matrix.python-version }}-${{ matrix.os }}-test-coverage
0 commit comments