Skip to content

Commit 135e597

Browse files
committed
use CI script in image
1 parent 12f3632 commit 135e597

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

Dockerfile.ci

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This Dockerfile onnly for GH action runs and performs:
1+
# This Dockerfile only for GH action runs and performs:
22
# 1) Code lint checking
33
# 2) Runs tests from tests/
44
#
@@ -34,39 +34,8 @@ COPY . .
3434
# Install python dependencies
3535
RUN uv sync
3636

37-
# Step 1: Code lint checking with ruff
38-
RUN echo "=== Running Code Linting ===" && \
39-
uv run ruff check . && \
40-
uv run ruff format --check .
37+
# Make script executable
38+
RUN chmod +x scripts/ci.sh
4139

42-
# Step 2: Run tests
43-
RUN echo "=== Running Python Script(s) Tests ===" && \
44-
uv run pytest -v tests/test_evals.py \
45-
tests/test_models.py::test_api_connection_with_no_env_load
46-
47-
# Step 3: Run tests for ground truth with corrresponding testbench
48-
RUN echo "=== Running Verilog Tests ===" && \
49-
# Collect all filenames in a directory:
50-
# 1) tb_*.v and 2) answer_*.v
51-
cd dataset/testbench/hdlbits && \
52-
find . -name "tb_*.v" | while read tb_path; do \
53-
# Get directory and filename
54-
dir=$(dirname "$tb_path"); \
55-
tb_file=$(basename "$tb_path"); \
56-
base=${tb_file#tb_}; \
57-
base=${base%.v}; \
58-
answer_file="answer_${base}.v"; \
59-
answer_path="${dir}/${answer_file}"; \
60-
\
61-
if [ -f "$answer_path" ]; then \
62-
echo "Testing: ${dir}/${base}"; \
63-
cd "$dir" && \
64-
# Run verilog testbench using icarus verilog
65-
iverilog -o test_${base} ${tb_file} ${answer_file} && \
66-
vvp test_${base} || (echo "✗ Test failed: ${dir}/${base}" && exit 1); \
67-
cd - > /dev/null; \
68-
else \
69-
echo "⚠ Missing answer file: $answer_path"; \
70-
fi; \
71-
done && \
72-
echo "✓ All Verilog tests passed!"
40+
# Runner/Executable point
41+
CMD ["./scripts/ci.sh"]

0 commit comments

Comments
 (0)