Run Tests (Full Offline) #275
This file contains hidden or 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: Run Tests (Full Offline) | |
| on: | |
| pull_request: | |
| schedule: | |
| - cron: '0 12 * * *' # Runs every day at 12 PM UTC (7 AM EST) | |
| jobs: | |
| tests-offline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Upgrade pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| python --version | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install .[all] | |
| python -m pip install .[ml_dev] | |
| - name: Create offline settings | |
| run: | | |
| flowcept --init-settings --full -y | |
| flowcept --config-profile full-offline -y | |
| - name: Verify offline settings | |
| run: | | |
| python - <<'PY' | |
| import flowcept.configs as c | |
| assert c.DB_FLUSH_MODE == "offline", f"DB_FLUSH_MODE={c.DB_FLUSH_MODE}" | |
| assert not c.MQ_ENABLED, f"MQ_ENABLED={c.MQ_ENABLED}" | |
| assert not c.KVDB_ENABLED, f"KVDB_ENABLED={c.KVDB_ENABLED}" | |
| assert not c.MONGO_ENABLED, f"MONGO_ENABLED={c.MONGO_ENABLED}" | |
| assert not c.LMDB_ENABLED, f"LMDB_ENABLED={c.LMDB_ENABLED}" | |
| print("Offline guardrails passed.") | |
| print("DUMP_BUFFER_ENABLED:", c.DUMP_BUFFER_ENABLED) | |
| print("DUMP_BUFFER_PATH:", c.DUMP_BUFFER_PATH) | |
| print("APPEND_WORKFLOW_ID_TO_PATH:", c.APPEND_WORKFLOW_ID_TO_PATH) | |
| print("APPEND_ID_TO_PATH:", c.APPEND_ID_TO_PATH) | |
| print("DELETE_BUFFER_FILE:", c.DELETE_BUFFER_FILE) | |
| PY | |
| - name: Run tests (offline) | |
| run: make tests-offline |