CICD stability would be nice.
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 56s
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 56s
Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
@@ -194,6 +194,11 @@ jobs:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
HOOK: ${{ matrix.hook }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
echo "=== Pre-commit Hook Start ==="
|
||||
echo "hook=${HOOK}"
|
||||
echo "head_sha=${HEAD_SHA}"
|
||||
|
||||
if [ "${HOOK}" = "prettier" ]; then
|
||||
echo "=== Host Workspace Debug (prettier) ==="
|
||||
echo "host_head_sha=${HEAD_SHA}"
|
||||
@@ -203,6 +208,8 @@ jobs:
|
||||
cd ..
|
||||
fi
|
||||
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm -e CI=true --entrypoint /bin/sh "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" -c "
|
||||
export HOME=/tmp/cicd-home && mkdir -p \"$HOME\" &&
|
||||
echo 'running_hook=${HOOK}' &&
|
||||
@@ -254,7 +261,32 @@ jobs:
|
||||
;;
|
||||
esac &&
|
||||
/workspace/backend/.venv/bin/pre-commit run ${HOOK} --all-files --show-diff-on-failure
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
HOOK_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${HOOK_STATUS}" -ne 0 ]; then
|
||||
echo "❌ Pre-commit hook failed: ${HOOK} (exit=${HOOK_STATUS})"
|
||||
echo "--- Last 200 lines of hook output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
|
||||
if [ "${HOOK}" = "pydoclint" ]; then
|
||||
echo "=== Additional pydoclint diagnostics ==="
|
||||
docker run --rm -e CI=true --entrypoint /bin/sh "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" -c "
|
||||
set -e
|
||||
cd /workspace/backend
|
||||
echo 'python_version=' && python3 --version
|
||||
echo 'uv_version=' && uv --version
|
||||
echo 'pydoclint_version=' && uv run pydoclint --version
|
||||
echo 'backend_py_count=' && find src -name '*.py' | wc -l
|
||||
echo 'running_direct_pydoclint='
|
||||
uv run pydoclint --config=pyproject.toml src/
|
||||
" || true
|
||||
fi
|
||||
|
||||
exit "${HOOK_STATUS}"
|
||||
fi
|
||||
|
||||
echo "=== Pre-commit Hook End (success) ==="
|
||||
|
||||
dispatch-tests:
|
||||
name: Dispatch CICD Tests
|
||||
|
||||
@@ -135,11 +135,22 @@ jobs:
|
||||
env:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" bash -c "
|
||||
cd /workspace/backend &&
|
||||
source .venv/bin/activate &&
|
||||
uv run pytest -v --tb=short --cov=src --cov-report=term-missing --cov-fail-under=95
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
TEST_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${TEST_STATUS}" -ne 0 ]; then
|
||||
echo "❌ Backend tests failed (exit=${TEST_STATUS})"
|
||||
echo "--- Last 200 lines of backend test output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
exit "${TEST_STATUS}"
|
||||
fi
|
||||
|
||||
frontend-tests:
|
||||
name: Frontend Tests
|
||||
@@ -166,10 +177,21 @@ jobs:
|
||||
env:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" bash -c "
|
||||
cd /workspace/frontend &&
|
||||
yarn test:coverage --run --reporter=verbose --coverage.reporter=text --coverage.reporter=text-summary --coverage.thresholds.lines=85 --coverage.thresholds.functions=85 --coverage.thresholds.branches=85 --coverage.thresholds.statements=85
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
TEST_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${TEST_STATUS}" -ne 0 ]; then
|
||||
echo "❌ Frontend tests failed (exit=${TEST_STATUS})"
|
||||
echo "--- Last 200 lines of frontend test output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
exit "${TEST_STATUS}"
|
||||
fi
|
||||
|
||||
xdoctest:
|
||||
name: Backend Doctests
|
||||
@@ -196,11 +218,22 @@ jobs:
|
||||
env:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" bash -c "
|
||||
cd /workspace/backend &&
|
||||
source .venv/bin/activate &&
|
||||
uv run xdoctest src/ --quiet
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
TEST_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${TEST_STATUS}" -ne 0 ]; then
|
||||
echo "❌ Backend doctests failed (exit=${TEST_STATUS})"
|
||||
echo "--- Last 200 lines of doctest output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
exit "${TEST_STATUS}"
|
||||
fi
|
||||
|
||||
integration-tests:
|
||||
name: Integration Tests
|
||||
@@ -227,6 +260,9 @@ jobs:
|
||||
env:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" bash -c "
|
||||
cd /workspace/backend &&
|
||||
source .venv/bin/activate &&
|
||||
@@ -235,7 +271,15 @@ jobs:
|
||||
else
|
||||
echo 'No integration tests found'
|
||||
fi
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
TEST_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${TEST_STATUS}" -ne 0 ]; then
|
||||
echo "❌ Integration tests failed (exit=${TEST_STATUS})"
|
||||
echo "--- Last 200 lines of integration test output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
exit "${TEST_STATUS}"
|
||||
fi
|
||||
|
||||
e2e-tests:
|
||||
name: End-to-End Tests
|
||||
@@ -262,6 +306,9 @@ jobs:
|
||||
env:
|
||||
HEAD_SHA: ${{ needs.setup.outputs.head_sha }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
LOG_FILE="$(mktemp)"
|
||||
|
||||
docker run --rm -e CI=true "${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd:${HEAD_SHA}" bash -c "
|
||||
cd /workspace/frontend &&
|
||||
if [ -d 'tests/e2e' ] || grep -q 'playwright' package.json; then
|
||||
@@ -286,4 +333,12 @@ jobs:
|
||||
else
|
||||
echo 'No E2E tests found'
|
||||
fi
|
||||
"
|
||||
" 2>&1 | tee "${LOG_FILE}"
|
||||
|
||||
TEST_STATUS=${PIPESTATUS[0]}
|
||||
if [ "${TEST_STATUS}" -ne 0 ]; then
|
||||
echo "❌ E2E tests failed (exit=${TEST_STATUS})"
|
||||
echo "--- Last 200 lines of E2E output ---"
|
||||
tail -n 200 "${LOG_FILE}" || true
|
||||
exit "${TEST_STATUS}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user