-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from ORNL/dev
Dev
- Loading branch information
Showing
21 changed files
with
239 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Tests on py11 | ||
on: [pull_request] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
if: "!contains(github.event.head_commit.message, 'CI Bot')" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: "pip" | ||
|
||
- name: Show OS Info | ||
run: '[[ "$OSTYPE" == "linux-gnu"* ]] && { echo "OS Type: Linux"; (command -v lsb_release &> /dev/null && lsb_release -a) || cat /etc/os-release; uname -r; } || [[ "$OSTYPE" == "darwin"* ]] && { echo "OS Type: macOS"; sw_vers; uname -r; } || echo "Unsupported OS type: $OSTYPE"' | ||
|
||
- name: Start docker compose with redis | ||
run: make services | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Show Python version | ||
run: python --version && pip --version | ||
|
||
- name: Install default dependencies and run simple test | ||
run: | | ||
pip install . | ||
python examples/simple_instrumented_script.py | ||
- name: Install Dask dependencies alone and run a simple Dask test | ||
run: | | ||
pip uninstall flowcept -y | ||
pip install .[dask] | ||
python examples/dask_example.py | ||
- name: Install MLFlow dependencies alone and run a simple MLFlow test | ||
run: | | ||
pip uninstall flowcept -y | ||
pip install .[mlflow] | ||
python examples/mlflow_example.py | ||
- name: Install Tensorboard dependencies alone and run a simple Tensorboard test | ||
run: | | ||
pip uninstall flowcept -y | ||
pip install .[tensorboard] | ||
python examples/tensorboard_example.py | ||
- name: Install all dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[all] | ||
- name: List installed packages | ||
run: pip list | ||
|
||
- name: Test with pytest and redis | ||
run: | | ||
make tests | ||
- name: Test notebooks with pytest and redis | ||
run: make tests-notebooks | ||
|
||
- name: Shut down docker compose | ||
run: make services-stop | ||
|
||
- name: Start docker compose with kafka | ||
run: docker compose -f deployment/compose-kafka.yml up -d | ||
|
||
- name: Wait for one minute | ||
run: sleep 60 | ||
|
||
- name: Check liveness | ||
run: | | ||
export MQ_TYPE=kafka | ||
export MQ_PORT=9092 | ||
python -c 'from flowcept.configs import MQ_TYPE, MQ_PORT; print(f"MQ_TYPE={MQ_TYPE}"); print(f"MQ_PORT={MQ_PORT}")' | ||
python -c 'from flowcept import Flowcept; assert Flowcept.services_alive()' | ||
- name: Run tests with kafka | ||
run: | | ||
export MQ_TYPE=kafka | ||
export MQ_PORT=9092 | ||
# Ignoring heavy tests. They are executed with Kafka in another GH Action. | ||
pytest --ignore=tests/decorator_tests/ml_tests --ignore=tests/adapters/test_tensorboard.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.8' | ||
name: flowcept | ||
services: | ||
flowcept_redis: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.8' | ||
name: flowcept | ||
services: | ||
flowcept_redis: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.8' | ||
name: flowcept | ||
services: | ||
flowcept_redis: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
"""Commons subpackage.""" | ||
|
||
from flowcept.commons.flowcept_logger import FlowceptLogger | ||
|
||
logger = FlowceptLogger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.