Skip to content

Commit e83a8fc

Browse files
chore(ci): fix unit workflow result handling
1 parent 08f40bf commit e83a8fc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/pr-check-test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ jobs:
100100
101101
echo "Selected ${#shard_tests[@]} integration test files:"
102102
printf ' - %s\n' "${shard_tests[@]}"
103+
set +e
103104
uv run pytest "${shard_tests[@]}" -v --disable-warnings --continue-on-collection-errors 2>&1 | tee result_integration.log
104105
pytest_exit=${PIPESTATUS[0]}
105-
echo "exit_code=$pytest_exit" >> $GITHUB_OUTPUT
106+
set -e
107+
echo "exit_code=$pytest_exit" >> "$GITHUB_OUTPUT"
106108
if [ $pytest_exit -ne 0 ]; then
107109
echo "❌ Some integration tests failed"
108110
echo "Failed tests:"
@@ -150,16 +152,21 @@ jobs:
150152
- name: Install dependencies
151153
run: uv sync --all-extras --dev
152154

155+
- name: Generate Proto Files
156+
run: uv run python generate_proto.py
157+
153158
- name: Run unit tests
154159
id: unit
155160
continue-on-error: true
156161
shell: bash
157162
run: |
158163
set -o pipefail
159164
echo "🚀 Running unit tests..."
165+
set +e
160166
uv run pytest tests/unit -v --disable-warnings --continue-on-collection-errors 2>&1 | tee result_unit.log
161167
pytest_exit=${PIPESTATUS[0]}
162-
echo "exit_code=$pytest_exit" >> $GITHUB_OUTPUT
168+
set -e
169+
echo "exit_code=$pytest_exit" >> "$GITHUB_OUTPUT"
163170
if [ $pytest_exit -ne 0 ]; then
164171
echo "❌ Some unit tests failed"
165172
echo "Failed tests:"

0 commit comments

Comments
 (0)