Skip to content

Commit 79d8271

Browse files
committed
fix: required checks per package skip
1 parent 2b9e5a0 commit 79d8271

2 files changed

Lines changed: 206 additions & 0 deletions

File tree

.github/workflows/lint-packages.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,114 @@ jobs:
8282
run: |
8383
echo "Custom version testing enabled - skipping normal lint process"
8484
echo "This job completes successfully to allow PR merging"
85+
86+
# Per-package gate jobs that always run
87+
lint-llamaindex:
88+
name: Lint uipath-llamaindex
89+
needs: detect-changed-packages
90+
runs-on: ubuntu-latest
91+
if: '!contains(github.event.pull_request.labels.*.name, ''test-core-dev-version'')'
92+
steps:
93+
- name: Check if package changed
94+
id: check
95+
run: |
96+
if echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-llamaindex'; then
97+
echo "changed=true" >> $GITHUB_OUTPUT
98+
else
99+
echo "changed=false" >> $GITHUB_OUTPUT
100+
fi
101+
102+
- name: Skip if no changes
103+
if: steps.check.outputs.changed != 'true'
104+
run: echo "No changes to uipath-llamaindex, skipping lint"
105+
106+
- name: Checkout
107+
if: steps.check.outputs.changed == 'true'
108+
uses: actions/checkout@v4
109+
110+
- name: Setup uv
111+
if: steps.check.outputs.changed == 'true'
112+
uses: astral-sh/setup-uv@v5
113+
with:
114+
enable-cache: true
115+
116+
- name: Setup Python
117+
if: steps.check.outputs.changed == 'true'
118+
uses: actions/setup-python@v5
119+
with:
120+
python-version-file: "packages/uipath-llamaindex/.python-version"
121+
122+
- name: Install dependencies
123+
if: steps.check.outputs.changed == 'true'
124+
working-directory: packages/uipath-llamaindex
125+
run: uv sync --all-extras
126+
127+
- name: Check static types
128+
if: steps.check.outputs.changed == 'true'
129+
working-directory: packages/uipath-llamaindex
130+
run: uv run mypy --config-file pyproject.toml .
131+
132+
- name: Check linting
133+
if: steps.check.outputs.changed == 'true'
134+
working-directory: packages/uipath-llamaindex
135+
run: uv run ruff check .
136+
137+
- name: Check formatting
138+
if: steps.check.outputs.changed == 'true'
139+
working-directory: packages/uipath-llamaindex
140+
run: uv run ruff format --check .
141+
142+
lint-openai-agents:
143+
name: Lint uipath-openai-agents
144+
needs: detect-changed-packages
145+
runs-on: ubuntu-latest
146+
if: '!contains(github.event.pull_request.labels.*.name, ''test-core-dev-version'')'
147+
steps:
148+
- name: Check if package changed
149+
id: check
150+
run: |
151+
if echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-openai-agents'; then
152+
echo "changed=true" >> $GITHUB_OUTPUT
153+
else
154+
echo "changed=false" >> $GITHUB_OUTPUT
155+
fi
156+
157+
- name: Skip if no changes
158+
if: steps.check.outputs.changed != 'true'
159+
run: echo "No changes to uipath-openai-agents, skipping lint"
160+
161+
- name: Checkout
162+
if: steps.check.outputs.changed == 'true'
163+
uses: actions/checkout@v4
164+
165+
- name: Setup uv
166+
if: steps.check.outputs.changed == 'true'
167+
uses: astral-sh/setup-uv@v5
168+
with:
169+
enable-cache: true
170+
171+
- name: Setup Python
172+
if: steps.check.outputs.changed == 'true'
173+
uses: actions/setup-python@v5
174+
with:
175+
python-version-file: "packages/uipath-openai-agents/.python-version"
176+
177+
- name: Install dependencies
178+
if: steps.check.outputs.changed == 'true'
179+
working-directory: packages/uipath-openai-agents
180+
run: uv sync --all-extras
181+
182+
- name: Check static types
183+
if: steps.check.outputs.changed == 'true'
184+
working-directory: packages/uipath-openai-agents
185+
run: uv run mypy --config-file pyproject.toml .
186+
187+
- name: Check linting
188+
if: steps.check.outputs.changed == 'true'
189+
working-directory: packages/uipath-openai-agents
190+
run: uv run ruff check .
191+
192+
- name: Check formatting
193+
if: steps.check.outputs.changed == 'true'
194+
working-directory: packages/uipath-openai-agents
195+
run: uv run ruff format --check .

.github/workflows/test-packages.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,98 @@ jobs:
6565

6666
- name: Run tests
6767
run: uv run pytest
68+
69+
# Per-package gate jobs that always run
70+
test-llamaindex:
71+
name: Test (uipath-llamaindex, ${{ matrix.python-version }}, ${{ matrix.os }})
72+
needs: detect-changed-packages
73+
runs-on: ${{ matrix.os }}
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
python-version: ["3.11", "3.12", "3.13"]
78+
os: [ubuntu-latest, windows-latest]
79+
steps:
80+
- name: Check if package changed
81+
id: check
82+
run: |
83+
if echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-llamaindex'; then
84+
echo "changed=true" >> $GITHUB_OUTPUT
85+
else
86+
echo "changed=false" >> $GITHUB_OUTPUT
87+
fi
88+
89+
- name: Skip if no changes
90+
if: steps.check.outputs.changed != 'true'
91+
run: echo "No changes to uipath-llamaindex, skipping tests"
92+
93+
- name: Checkout
94+
if: steps.check.outputs.changed == 'true'
95+
uses: actions/checkout@v4
96+
97+
- name: Setup uv
98+
if: steps.check.outputs.changed == 'true'
99+
uses: astral-sh/setup-uv@v5
100+
101+
- name: Setup Python
102+
if: steps.check.outputs.changed == 'true'
103+
uses: actions/setup-python@v5
104+
with:
105+
python-version: ${{ matrix.python-version }}
106+
107+
- name: Install dependencies
108+
if: steps.check.outputs.changed == 'true'
109+
working-directory: packages/uipath-llamaindex
110+
run: uv sync --all-extras --python ${{ matrix.python-version }}
111+
112+
- name: Run tests
113+
if: steps.check.outputs.changed == 'true'
114+
working-directory: packages/uipath-llamaindex
115+
run: uv run pytest
116+
117+
test-openai-agents:
118+
name: Test (uipath-openai-agents, ${{ matrix.python-version }}, ${{ matrix.os }})
119+
needs: detect-changed-packages
120+
runs-on: ${{ matrix.os }}
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
python-version: ["3.11", "3.12", "3.13"]
125+
os: [ubuntu-latest, windows-latest]
126+
steps:
127+
- name: Check if package changed
128+
id: check
129+
run: |
130+
if echo '${{ needs.detect-changed-packages.outputs.packages }}' | grep -q 'uipath-openai-agents'; then
131+
echo "changed=true" >> $GITHUB_OUTPUT
132+
else
133+
echo "changed=false" >> $GITHUB_OUTPUT
134+
fi
135+
136+
- name: Skip if no changes
137+
if: steps.check.outputs.changed != 'true'
138+
run: echo "No changes to uipath-openai-agents, skipping tests"
139+
140+
- name: Checkout
141+
if: steps.check.outputs.changed == 'true'
142+
uses: actions/checkout@v4
143+
144+
- name: Setup uv
145+
if: steps.check.outputs.changed == 'true'
146+
uses: astral-sh/setup-uv@v5
147+
148+
- name: Setup Python
149+
if: steps.check.outputs.changed == 'true'
150+
uses: actions/setup-python@v5
151+
with:
152+
python-version: ${{ matrix.python-version }}
153+
154+
- name: Install dependencies
155+
if: steps.check.outputs.changed == 'true'
156+
working-directory: packages/uipath-openai-agents
157+
run: uv sync --all-extras --python ${{ matrix.python-version }}
158+
159+
- name: Run tests
160+
if: steps.check.outputs.changed == 'true'
161+
working-directory: packages/uipath-openai-agents
162+
run: uv run pytest

0 commit comments

Comments
 (0)