From 48f5f8efa5ba7f6ad09c7cdca5117d40ffb10da0 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 9 Jul 2026 13:58:09 +0800 Subject: [PATCH] =?UTF-8?q?ci(P2-5):=20=E6=B5=8B=E8=AF=95=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=97=B6=E4=B8=8A=E4=BC=A0=E7=BB=93=E6=9E=9C=E4=BA=A7?= =?UTF-8?q?=E7=89=A9=EF=BC=8Cpytest=E8=BE=93=E5=87=BA=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 2a150a1e6..ca6251575 100755 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -176,7 +176,8 @@ jobs: USE_IN_MEMORY_DB: "true" run: | set -eu - PYTHONPATH="$PWD/apps/api:$PWD" python3 -m pytest tests/unit -q + mkdir -p test-results + PYTHONPATH="$PWD/apps/api:$PWD" python3 -m pytest tests/unit -v --junitxml=test-results/unit-tests.xml --tb=short - name: Start PostgreSQL for integration tests shell: sh @@ -221,7 +222,17 @@ jobs: run: | set -eu pip install -q pytest-rerunfailures - PYTHONPATH="$PWD/apps/api:$PWD" python3 -m pytest tests/integration -q --timeout=60 -x --reruns 2 --reruns-delay 1 -m "not performance" + mkdir -p test-results + PYTHONPATH="$PWD/apps/api:$PWD" python3 -m pytest tests/integration -v --timeout=60 -x --reruns 2 --reruns-delay 1 -m "not performance" --junitxml=test-results/integration-tests.xml --tb=short + + - name: Upload test results on failure + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test-results-${{ github.run_id }} + path: | + test-results/ + *.log - name: Run API performance baseline tests shell: sh