84b3b7d8e8
Adds a complete pytest system test suite for the HoneyBiscuitWorkshop CI/CD system: - runner.sh: orchestrates build, Docker image creation, and test execution - Dockerfile: Arch Linux-based test image with Python venv - conftest.py: shared fixtures (baker_bin, run_baker, work_dir, llm_env) - probes/: environment probes for checking users, files, packages, processes - llm/: LLM-based log judgment system with caching for semantic test evaluation - fixtures/: test configs and scripts for prebake, bake, and finalize stages - test_prebake.py, test_bake.py, test_finalize.py: test suites for each pipeline stage Also refactors finalize.yml.tmpl notification config to use a templates system.
33 lines
1.0 KiB
Docker
33 lines
1.0 KiB
Docker
FROM archlinux:latest
|
|
|
|
RUN sed -i 's|https://geo.mirror.pkgbuild.com|https://mirrors.tuna.tsinghua.edu.cn/archlinux|g' /etc/pacman.d/mirrorlist && \
|
|
sed -i 's|https://mirror.rackspace.com/archlinux|https://mirrors.tuna.tsinghua.edu.cn/archlinux|g' /etc/pacman.d/mirrorlist && \
|
|
echo 'Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
|
|
|
|
RUN pacman -Syu --noconfirm && \
|
|
pacman -S --noconfirm \
|
|
python python-pip base-devel git curl wget sudo \
|
|
which procps-ng shadow && \
|
|
pacman -Scc --noconfirm
|
|
|
|
# Create test user
|
|
RUN useradd -m -s /bin/bash testuser
|
|
|
|
# Python environment
|
|
WORKDIR /app
|
|
COPY tests/requirements.txt ./requirements.txt
|
|
RUN python -m venv /opt/test-venv && \
|
|
/opt/test-venv/bin/pip install -r requirements.txt
|
|
|
|
# Copy test suite
|
|
COPY tests/ ./tests/
|
|
COPY tests/entrypoint.sh ./entrypoint.sh
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
# Environment
|
|
ENV PATH="/opt/test-venv/bin:$PATH"
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|