Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependabot_auto_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
auto-merge:
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'dependabot/')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/install-dispatch-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false

jobs:
install:
runs-on: self-hosted
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ env:
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/677468735457/locations/global/workloadIdentityPools/github-actions/providers/github-main
GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: binance-platform-runtime@binancequant.iam.gserviceaccount.com

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false

jobs:
deploy:
runs-on: self-hosted
timeout-minutes: 60
permissions:
contents: write
id-token: write
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/runner-scheduler-diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false

jobs:
inspect:
runs-on: self-hosted
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/runtime-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ on:
schedule:
- cron: "35 * * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false

jobs:
heartbeat:
name: Check Runtime workflow heartbeat
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
actions: read
contents: read
Expand Down
17 changes: 17 additions & 0 deletions tests/test_main_runtime_error_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,23 @@ class BinanceAPIException(Exception):


class MainRuntimeErrorNotificationTests(unittest.TestCase):
def test_main_wires_cli_entrypoint_with_runtime_builder_and_cycle_runner(self):
observed = {}

def fake_run_cli_entrypoint(**kwargs):
observed.update(kwargs)
return {"ok": True}

with patch.object(main, "run_cli_entrypoint", fake_run_cli_entrypoint):
result = main.main()

self.assertEqual(result, {"ok": True})
self.assertIs(observed["runtime_builder"], main.build_live_runtime)
self.assertIs(observed["execute_cycle"], main.execute_cycle)
self.assertIs(observed["output_printer"], print)
self.assertIs(observed["exit_fn"], sys.exit)
self.assertFalse(hasattr(main, "app"))

def test_main_notifies_telegram_when_cli_entrypoint_fails_before_cycle(self):
observed = {"messages": []}

Expand Down