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