17
17
- ' poetry.lock'
18
18
- ' pyproject.toml'
19
19
pull_request :
20
- paths :
21
- - ' airbyte_cdk/**'
22
- - ' unit_tests/**'
23
- - ' poetry.lock'
24
- - ' pyproject.toml'
25
20
26
21
jobs :
27
22
pytest :
@@ -52,21 +47,35 @@ jobs:
52
47
# Common steps:
53
48
- name : Checkout code
54
49
uses : actions/checkout@v4
50
+ - id : changes
51
+ uses : dorny/paths-filter@v3.0.2
52
+ with :
53
+ filters : |
54
+ src:
55
+ - 'airbyte_cdk/**'
56
+ - 'unit_tests/**'
57
+ - 'bin/**'
58
+ - 'poetry.lock'
59
+ - 'pyproject.toml'
55
60
- name : Set up Poetry
56
61
uses : Gr1N/setup-poetry@v9
62
+ if : steps.changes.outputs.src == 'true'
57
63
with :
58
64
poetry-version : " 1.7.1"
59
65
- name : Set up Python
60
66
uses : actions/setup-python@v5
67
+ if : steps.changes.outputs.src == 'true'
61
68
with :
62
69
python-version : ${{ matrix.python-version }}
63
70
cache : " poetry"
64
71
- name : Install dependencies
72
+ if : steps.changes.outputs.src == 'true'
65
73
run : poetry install --all-extras
66
74
67
75
# Job-specific step(s):
68
76
- name : Run Pytest
69
77
timeout-minutes : 60
78
+ if : steps.changes.outputs.src == 'true'
70
79
env :
71
80
GCP_GSM_CREDENTIALS : ${{ secrets.GCP_GSM_CREDENTIALS }}
72
81
run : >
@@ -75,17 +84,17 @@ jobs:
75
84
-m "not linting and not super_slow and not flaky"
76
85
77
86
- name : Print Coverage Report
78
- if : always()
87
+ if : always() && steps.changes.outputs.src == 'true'
79
88
run : poetry run coverage report
80
89
81
90
- name : Create Coverage Artifacts
82
- if : always()
91
+ if : always() && steps.changes.outputs.src == 'true'
83
92
run : |
84
93
poetry run coverage html -d htmlcov
85
94
poetry run coverage xml -o htmlcov/coverage.xml
86
95
87
96
- name : Upload coverage to GitHub Artifacts
88
- if : always()
97
+ if : always() && steps.changes.outputs.src == 'true'
89
98
uses : actions/upload-artifact@v4
90
99
with :
91
100
name : py${{ matrix.python-version }}-${{ matrix.os }}-test-coverage
0 commit comments