6b140402dd
test / run tests/run_tests.py (pull_request) Failing after 2m59s
Run tests/run_tests.py on every PR push and on push to main. The suite uses stdlib unittest, so the workflow only needs Python; integration tests skip cleanly when the runner has no Docker daemon reachable. Refs: PRD 0002 Assisted-by: Claude Code
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
# Run the project's full test suite on every PR push and on push to main.
|
|
#
|
|
# The suite uses stdlib `unittest` (see tests/run_tests.py) — no external
|
|
# Python dependencies are required to execute it. Integration tests need a
|
|
# reachable Docker daemon; if Docker is unavailable on the runner those
|
|
# tests skip cleanly via tests/_docker.py:skip_unless_docker, so the job
|
|
# still passes (with skips visible in the run output).
|
|
#
|
|
# This workflow assumes the Gitea Actions runner exposes the host Docker
|
|
# socket to the job container so `docker` commands inside the job can
|
|
# reach the daemon. If that's not yet configured on the runner the
|
|
# integration tests will skip rather than fail.
|
|
|
|
name: test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: run tests/run_tests.py
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Show environment
|
|
run: |
|
|
python3 --version
|
|
if command -v docker >/dev/null 2>&1; then
|
|
docker version || true
|
|
else
|
|
echo "docker not on PATH — integration tests will skip"
|
|
fi
|
|
|
|
- name: Run full test suite
|
|
run: python3 tests/run_tests.py
|