@@ -31,120 +31,66 @@ jobs:
3131 HEAD_SHA : ${{ github.event.pull_request.head.sha }}
3232 run : python .github/scripts/detect_changed_packages.py
3333
34- lint :
35- name : Lint ${{ matrix.package }}
36- needs : detect-changed-packages
37- if : needs.detect-changed-packages.outputs.count > 0 && !contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
38- runs-on : ubuntu-latest
39- defaults :
40- run :
41- working-directory : packages/${{ matrix.package }}
42- strategy :
43- fail-fast : false
44- matrix :
45- package : ${{ fromJson(needs.detect-changed-packages.outputs.packages) }}
46-
47- steps :
48- - name : Checkout
49- uses : actions/checkout@v4
50-
51- - name : Setup uv
52- uses : astral-sh/setup-uv@v5
53- with :
54- enable-cache : true
55-
56- - name : Setup Python
57- uses : actions/setup-python@v5
58- with :
59- python-version-file : " packages/${{ matrix.package }}/.python-version"
60-
61- - name : Install dependencies
62- run : uv sync --all-extras
63-
64- - name : Check static types
65- run : uv run mypy --config-file pyproject.toml .
66-
67- - name : Check linting
68- run : uv run ruff check .
69-
70- - name : Check formatting
71- run : uv run ruff format --check .
72-
73- skip-lint :
74- name : Skip Lint (Custom Version Testing)
75- runs-on : ubuntu-latest
76- if : contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
77- permissions :
78- contents : read
79- steps :
80- - name : Skip lint for custom version testing
81- run : |
82- echo "Custom version testing enabled - skipping normal lint process"
83- echo "This job completes successfully to allow PR merging"
84-
85- # Per-package gate jobs that always run
8634 lint-llamaindex :
8735 name : Lint uipath-llamaindex
8836 needs : detect-changed-packages
8937 runs-on : ubuntu-latest
9038 steps :
91- - name : Check if should skip
39+ - name : Check if package changed
9240 id : check
9341 run : |
94- # Check for test-core-dev-version label
9542 if [[ "${{ contains(github.event.pull_request.labels.*.name, 'test-core-dev-version') }}" == "true" ]]; then
96- echo "changed=false " >> $GITHUB_OUTPUT
43+ echo "skip=true " >> $GITHUB_OUTPUT
9744 echo "reason=custom-version-testing" >> $GITHUB_OUTPUT
98- # Check if package changed
99- elif echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-llamaindex'; then
100- echo "changed=true" >> $GITHUB_OUTPUT
45+ elif echo '${{ needs.detect-changed-packages.outputs.packages }}' | jq -e 'index("uipath-llamaindex")' > /dev/null; then
46+ echo "skip=false" >> $GITHUB_OUTPUT
10147 else
102- echo "changed=false " >> $GITHUB_OUTPUT
48+ echo "skip=true " >> $GITHUB_OUTPUT
10349 echo "reason=no-changes" >> $GITHUB_OUTPUT
10450 fi
10551
106- - name : Skip if no changes or custom version testing
107- if : steps.check.outputs.changed ! = 'true'
52+ - name : Skip
53+ if : steps.check.outputs.skip = = 'true'
10854 run : |
10955 if [[ "${{ steps.check.outputs.reason }}" == "custom-version-testing" ]]; then
110- echo "Custom version testing enabled - skipping lint "
56+ echo "Skipping - custom version testing enabled"
11157 else
112- echo "No changes to uipath-llamaindex, skipping lint "
58+ echo "Skipping - no changes to uipath-llamaindex"
11359 fi
11460
11561 - name : Checkout
116- if : steps.check.outputs.changed = = 'true'
62+ if : steps.check.outputs.skip ! = 'true'
11763 uses : actions/checkout@v4
11864
11965 - name : Setup uv
120- if : steps.check.outputs.changed = = 'true'
66+ if : steps.check.outputs.skip ! = 'true'
12167 uses : astral-sh/setup-uv@v5
12268 with :
12369 enable-cache : true
12470
12571 - name : Setup Python
126- if : steps.check.outputs.changed = = 'true'
72+ if : steps.check.outputs.skip ! = 'true'
12773 uses : actions/setup-python@v5
12874 with :
12975 python-version-file : " packages/uipath-llamaindex/.python-version"
13076
13177 - name : Install dependencies
132- if : steps.check.outputs.changed = = 'true'
78+ if : steps.check.outputs.skip ! = 'true'
13379 working-directory : packages/uipath-llamaindex
13480 run : uv sync --all-extras
13581
13682 - name : Check static types
137- if : steps.check.outputs.changed = = 'true'
83+ if : steps.check.outputs.skip ! = 'true'
13884 working-directory : packages/uipath-llamaindex
13985 run : uv run mypy --config-file pyproject.toml .
14086
14187 - name : Check linting
142- if : steps.check.outputs.changed = = 'true'
88+ if : steps.check.outputs.skip ! = 'true'
14389 working-directory : packages/uipath-llamaindex
14490 run : uv run ruff check .
14591
14692 - name : Check formatting
147- if : steps.check.outputs.changed = = 'true'
93+ if : steps.check.outputs.skip ! = 'true'
14894 working-directory : packages/uipath-llamaindex
14995 run : uv run ruff format --check .
15096
@@ -153,62 +99,72 @@ jobs:
15399 needs : detect-changed-packages
154100 runs-on : ubuntu-latest
155101 steps :
156- - name : Check if should skip
102+ - name : Check if package changed
157103 id : check
158104 run : |
159- # Check for test-core-dev-version label
160105 if [[ "${{ contains(github.event.pull_request.labels.*.name, 'test-core-dev-version') }}" == "true" ]]; then
161- echo "changed=false " >> $GITHUB_OUTPUT
106+ echo "skip=true " >> $GITHUB_OUTPUT
162107 echo "reason=custom-version-testing" >> $GITHUB_OUTPUT
163- # Check if package changed
164- elif echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-openai-agents'; then
165- echo "changed=true" >> $GITHUB_OUTPUT
108+ elif echo '${{ needs.detect-changed-packages.outputs.packages }}' | jq -e 'index("uipath-openai-agents")' > /dev/null; then
109+ echo "skip=false" >> $GITHUB_OUTPUT
166110 else
167- echo "changed=false " >> $GITHUB_OUTPUT
111+ echo "skip=true " >> $GITHUB_OUTPUT
168112 echo "reason=no-changes" >> $GITHUB_OUTPUT
169113 fi
170114
171- - name : Skip if no changes or custom version testing
172- if : steps.check.outputs.changed ! = 'true'
115+ - name : Skip
116+ if : steps.check.outputs.skip = = 'true'
173117 run : |
174118 if [[ "${{ steps.check.outputs.reason }}" == "custom-version-testing" ]]; then
175- echo "Custom version testing enabled - skipping lint "
119+ echo "Skipping - custom version testing enabled"
176120 else
177- echo "No changes to uipath-openai-agents, skipping lint "
121+ echo "Skipping - no changes to uipath-openai-agents"
178122 fi
179123
180124 - name : Checkout
181- if : steps.check.outputs.changed = = 'true'
125+ if : steps.check.outputs.skip ! = 'true'
182126 uses : actions/checkout@v4
183127
184128 - name : Setup uv
185- if : steps.check.outputs.changed = = 'true'
129+ if : steps.check.outputs.skip ! = 'true'
186130 uses : astral-sh/setup-uv@v5
187131 with :
188132 enable-cache : true
189133
190134 - name : Setup Python
191- if : steps.check.outputs.changed = = 'true'
135+ if : steps.check.outputs.skip ! = 'true'
192136 uses : actions/setup-python@v5
193137 with :
194138 python-version-file : " packages/uipath-openai-agents/.python-version"
195139
196140 - name : Install dependencies
197- if : steps.check.outputs.changed = = 'true'
141+ if : steps.check.outputs.skip ! = 'true'
198142 working-directory : packages/uipath-openai-agents
199143 run : uv sync --all-extras
200144
201145 - name : Check static types
202- if : steps.check.outputs.changed = = 'true'
146+ if : steps.check.outputs.skip ! = 'true'
203147 working-directory : packages/uipath-openai-agents
204148 run : uv run mypy --config-file pyproject.toml .
205149
206150 - name : Check linting
207- if : steps.check.outputs.changed = = 'true'
151+ if : steps.check.outputs.skip ! = 'true'
208152 working-directory : packages/uipath-openai-agents
209153 run : uv run ruff check .
210154
211155 - name : Check formatting
212- if : steps.check.outputs.changed = = 'true'
156+ if : steps.check.outputs.skip ! = 'true'
213157 working-directory : packages/uipath-openai-agents
214158 run : uv run ruff format --check .
159+
160+ skip-lint :
161+ name : Skip Lint (Custom Version Testing)
162+ runs-on : ubuntu-latest
163+ if : contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
164+ permissions :
165+ contents : read
166+ steps :
167+ - name : Skip lint for custom version testing
168+ run : |
169+ echo "Custom version testing enabled - skipping normal lint process"
170+ echo "This job completes successfully to allow PR merging"
0 commit comments