Fix in GH action #144
Workflow file for this run
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
name: (With Mongo) Tests on Kafka MQ | |
#on: | |
# pull_request: | |
# branches: [ "dev", "main" ] | |
# types: [opened, synchronize, reopened] | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MONGO_ENABLED: true | |
LMDB_ENABLED: false | |
timeout-minutes: 40 | |
if: "!contains(github.event.head_commit.message, 'CI Bot')" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Run docker compose | |
run: docker compose -f deployment/compose-kafka.yml up -d | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Show Python version | |
run: python --version && pip --version | |
- name: Test examples | |
run: bash .github/workflows/run_examples.sh examples true # with mongo | |
- name: Install all dependencies | |
run: | | |
python -m pip install .[all] | |
python -m pip install .[ml_dev] | |
- 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 | |
make tests | |
- name: Test notebooks | |
run: pytest --ignore=notebooks/zambeze.ipynb --nbmake "notebooks/" --nbmake-timeout=600 --ignore=notebooks/dask_from_CLI.ipynb | |
- name: Stop services | |
run: docker compose -f deployment/compose-kafka.yml down | |
- name: Clean up | |
run: | | |
make clean | |
find /home/runner/runners/ -type f -name "*.log" -exec sh -c 'echo {}; >"{}"' \; || true | |
docker image prune -a -f |