Skip to content

Commit f5bfcf6

Browse files
committed
Show scrapyd-k8s logs for manifest configuration (PR #57)
1 parent fcac7e3 commit f5bfcf6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ jobs:
143143
# wait for scrapyd-k8s to become ready
144144
kubectl wait --for=condition=Available deploy/scrapyd-k8s --timeout=60s
145145
curl -s --retry 10 --retry-delay 2 --retry-all-errors `minikube service scrapyd-k8s --url`/daemonstatus.json
146-
# run test
146+
# run test (and show logs on test failure)
147147
TEST_WITH_K8S=1 \
148148
TEST_BASE_URL=`minikube service scrapyd-k8s --url` \
149149
TEST_MAX_WAIT=60 \
150150
TEST_AVAILABLE_VERSIONS=latest,`skopeo list-tags docker://ghcr.io/q-m/scrapyd-k8s-spider-example | jq -r '.Tags | map(select(. != "latest" and (startswith("sha-") | not))) | join(",")'` \
151-
pytest -vv --color=yes "$test"
151+
pytest -vv --color=yes "$test" || (kubectl logs deploy/scrapyd-k8s && false)
152152
# delete al jobs to start with a clean slate next time
153153
kubectl delete job --all
154154
# stop scrapyd-k8s and delete test-specific configmap

0 commit comments

Comments
 (0)