Skip to content

Commit c940572

Browse files
committed
update make file
1 parent db5e743 commit c940572

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

Makefile

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
.PHONY: test setup miniwob lint
1+
.PHONY: test setup miniwob lint stop-miniwob
2+
23
setup:
3-
@pip install darglint black
44
@pip install -e .
55
@playwright install chromium --with-deps
66
@python -c 'import nltk; nltk.download("punkt_tab")'
77

8-
miniwob:
9-
@kill -9 `cat .miniwob-server.pid` || true
8+
miniwob: stop-miniwob
109
@git clone https://github.com/Farama-Foundation/miniwob-plusplus.git || true
1110
@cd miniwob-plusplus && git checkout 7fd85d71a4b60325c6585396ec4f48377d049838
1211
@python -m http.server 8080 --directory miniwob-plusplus/miniwob/html & echo $$! > .miniwob-server.pid
13-
@sleep 2
1412
@echo "MiniWob server started on port 8080"
15-
@echo "To stop the server: kill \`cat .miniwob-server.pid\`"
1613

17-
test: setup miniwob
18-
@MINIWOB_URL="http://localhost:8080/miniwob/" pytest -n 5 --durations=10 -m 'not pricy' -v tests/
14+
stop-miniwob:
15+
@kill -9 `cat .miniwob-server.pid` || true
16+
@rm -f .miniwob-server.pid
17+
@echo "MiniWob server stopped"
18+
19+
run-tests:
20+
@MINIWOB_URL="http://localhost:8080/miniwob/" pytest -n 5 --durations=10 -m 'not pricy' tests/
21+
@echo "Tests completed"
22+
23+
test: setup miniwob run-tests stop-miniwob
1924

20-
lint:
21-
black src/ --check --diff
22-
darglint -v 2 -z short src/
25+
lint: setup
26+
@black src/ --check --diff
27+
@darglint -v 2 -z short src/

0 commit comments

Comments
 (0)