Skip to content

Commit

Permalink
continue debugging workflow 22
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Sep 11, 2024
1 parent 8c63e29 commit ea86e6e
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 4 deletions.
9 changes: 7 additions & 2 deletions code/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ setup_packages = [
{ path = "ws_client", run = false }
]
setup_scripts = [
{ path = "ws_client/requirements.sh", args = "" },
{ path = "ws_client/ws_server.py", args = "" }
]
test_package_paths = ["ws_client/test/ws_client_test"]
Expand All @@ -151,7 +152,9 @@ dependency_package_paths = []
setup_packages = [
{ path = "ws_server", run = true }
]
setup_scripts = []
setup_scripts = [
{ path = "ws_server/requirements.sh", args = "" }
]
test_package_paths = []
test_scripts = [{ path = "ws_server/ws_client.py", args = "" }]
timeout_secs = 5
Expand All @@ -169,7 +172,9 @@ dependency_package_paths = []
setup_packages = [
{ path = "ws_server_with_reply", run = true }
]
setup_scripts = []
setup_scripts = [
{ path = "ws_server/requirements.sh", args = "" }
]
test_package_paths = []
test_scripts = [{ path = "ws_server_with_reply/ws_client.py", args = "" }]
timeout_secs = 5
Expand Down
22 changes: 22 additions & 0 deletions code/ws_client/requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
echo "pip could not be found, installing..."
python -m ensurepip --upgrade
fi

# Update pip to the latest version.
python -m pip install --upgrade pip

# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
fi

echo "Package installation complete."
1 change: 1 addition & 0 deletions code/ws_client/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ setup_packages = [
{ path = "..", run = false }
]
setup_scripts = [
{ path = "ws_server/requirements.sh", args = "" },
{ path = "../ws_server.py", args = "" }
]
test_package_paths = ["ws_client_test"]
Expand Down
22 changes: 22 additions & 0 deletions code/ws_server/requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
echo "pip could not be found, installing..."
python -m ensurepip --upgrade
fi

# Update pip to the latest version.
python -m pip install --upgrade pip

# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
fi

echo "Package installation complete."
4 changes: 3 additions & 1 deletion code/ws_server/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ dependency_package_paths = []
setup_packages = [
{ path = "..", run = true }
]
setup_scripts = []
setup_scripts = [
{ path = "ws_server/requirements.sh", args = "" }
]
test_package_paths = []
test_scripts = [{ path = "../ws_client.py", args = "" }]
timeout_secs = 5
Expand Down
22 changes: 22 additions & 0 deletions code/ws_server_with_reply/requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Check if pip is installed and install it if it is not.
if ! command -v pip &> /dev/null
then
echo "pip could not be found, installing..."
python -m ensurepip --upgrade
fi

# Update pip to the latest version.
python -m pip install --upgrade pip

# Install packages from the requirements.txt file.
if [ -f "requirements.txt" ]; then
echo "Installing packages from requirements.txt..."
pip install -r requirements.txt
else
echo "Error: requirements.txt does not exist."
exit 0
fi

echo "Package installation complete."
4 changes: 3 additions & 1 deletion code/ws_server_with_reply/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ dependency_package_paths = []
setup_packages = [
{ path = "..", run = true }
]
setup_scripts = []
setup_scripts = [
{ path = "ws_server/requirements.sh", args = "" }
]
test_package_paths = []
test_scripts = [{ path = "../ws_client.py", args = "" }]
timeout_secs = 5
Expand Down

0 comments on commit ea86e6e

Please sign in to comment.