Skip to content

Commit

Permalink
Merge pull request #109 from FppEpitech/feat/implement-the-tests_run-…
Browse files Browse the repository at this point in the history
…rule-in-makefile-of-ai

fix: python tests architecture
  • Loading branch information
theophile-jr authored Jun 13, 2024
2 parents c0ff200 + 4561600 commit f0cce1e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ jobs:
container: epitechcontent/epitest-docker
steps:
- uses: actions/checkout@v4
- name: install_gui_dependencies
- name: install_dependencies
run: |
make install-deps-ci -C gui
make install-deps -C ai
- name: run_tests
run: make tests_run
timeout-minutes: 5
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion ai/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ fclean: clean

re: fclean all

install-deps:
sudo dnf install python3-virtualenv -y
virtualenv zappy_ai_env
./zappy_ai_env/bin/pip install -r requirements.txt

tests_run:
cp ../tests/ai/tests/MainTest.py $(TEST_NAME)
chmod 775 $(TEST_NAME)
cp $(TEST_NAME) ../
# TODO #11 (https://github.com/FppEpitech/Zappy/issues/11)
./zappy_ai_env/bin/coverage run ../$(TEST_NAME)
./zappy_ai_env/bin/coverage report
1 change: 0 additions & 1 deletion ai/requirement.txt

This file was deleted.

1 change: 1 addition & 0 deletions ai/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
12 changes: 6 additions & 6 deletions tests/ai/tests/MainTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## mainTest
##

from ai.tests.TestAI import testAI
from ai.tests.Network.TestAPI import testAPI
from ai.tests.Utils.TestUtils import testUtils
from ai.tests.Player.TestPlayer import testPlayer
from ai.tests.Player.TestInventory import testInventory
from ai.tests.Errors.TestErrors import testErrorsAndExceptions
from tests.ai.tests.TestAI import testAI
from tests.ai.tests.Network.TestAPI import testAPI
from tests.ai.tests.Utils.TestUtils import testUtils
from tests.ai.tests.Player.TestPlayer import testPlayer
from tests.ai.tests.Player.TestInventory import testInventory
from tests.ai.tests.Errors.TestErrors import testErrorsAndExceptions

def mainTest():
try:
Expand Down

0 comments on commit f0cce1e

Please sign in to comment.