Skip to content

Commit dab4fce

Browse files
committed
🔧 fix(workflows): add test env for external and nightly runs
Provide deterministic env vars for external/nightly jobs and scope to to avoid unrelated collection failures from global config imports.
1 parent 0e2182e commit dab4fce

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

‎.github/workflows/e2e-nightly.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ on:
55
schedule:
66
- cron: "30 3 * * *"
77

8+
env:
9+
BOT_TOKEN: "123456:TEST_TOKEN"
10+
TEST_BOT_TOKEN: "123456:TEST_TOKEN"
11+
BASE_FEE: "100"
12+
DB_URL: "sqlite+aiosqlite:///tmp/mmwb-test.db"
13+
REDIS_URL: "redis://localhost:6379/0"
14+
TRON_API_KEY: "test"
15+
TRON_MASTER_ADDRESS: "test"
16+
TRON_MASTER_KEY: "test"
17+
THOTHPAY_API: "test"
18+
OPENAI_KEY: "test"
19+
EURMTL_KEY: "test"
20+
SENTRY_DSN: "https://examplePublicKey@o0.ingest.sentry.io/0"
21+
HORIZON_URL: "https://horizon-testnet.stellar.org"
22+
HORIZON_URL_RW: "https://horizon-testnet.stellar.org"
23+
MONGODB_URL: "mongodb://localhost:27017/mmwb_test"
24+
GRIST_TOKEN: "test"
25+
TONCONSOLE_TOKEN: "test"
26+
TON_TOKEN: "test"
27+
WALLET_COST: "1"
28+
829
jobs:
930
testnet-canary:
1031
runs-on: ubuntu-latest

‎.github/workflows/external-integration.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ on:
55
schedule:
66
- cron: "0 3 * * *"
77

8+
env:
9+
BOT_TOKEN: "123456:TEST_TOKEN"
10+
TEST_BOT_TOKEN: "123456:TEST_TOKEN"
11+
BASE_FEE: "100"
12+
DB_URL: "sqlite+aiosqlite:///tmp/mmwb-test.db"
13+
REDIS_URL: "redis://localhost:6379/0"
14+
TRON_API_KEY: "test"
15+
TRON_MASTER_ADDRESS: "test"
16+
TRON_MASTER_KEY: "test"
17+
THOTHPAY_API: "test"
18+
OPENAI_KEY: "test"
19+
EURMTL_KEY: "test"
20+
SENTRY_DSN: "https://examplePublicKey@o0.ingest.sentry.io/0"
21+
HORIZON_URL: "https://horizon-testnet.stellar.org"
22+
HORIZON_URL_RW: "https://horizon-testnet.stellar.org"
23+
MONGODB_URL: "mongodb://localhost:27017/mmwb_test"
24+
GRIST_TOKEN: "test"
25+
TONCONSOLE_TOKEN: "test"
26+
TON_TOKEN: "test"
27+
WALLET_COST: "1"
28+
829
jobs:
930
external-tests:
1031
runs-on: ubuntu-latest
@@ -24,5 +45,8 @@ jobs:
2445
- name: Setup just
2546
uses: taiki-e/install-action@just
2647

48+
- name: Install system dependencies
49+
run: sudo apt-get update && sudo apt-get install -y libzbar0
50+
2751
- name: Run external integration tests
2852
run: just test-external

‎justfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test-e2e-smoke:
5757
cd bot && uv run --package mmwb-bot pytest tests/routers/test_common_start.py tests/routers/test_add_wallet.py tests/routers/test_wallet_setting.py tests/routers/test_send.py tests/routers/test_trade.py tests/routers/test_swap.py tests/routers/test_sign.py tests/routers/test_inout.py -m "not external"
5858

5959
test-external:
60-
cd bot && uv run --package mmwb-bot pytest -m external
60+
cd bot && uv run --package mmwb-bot pytest tests/external -m external
6161

6262
arch-test:
6363
uv run python .linters/check_import_boundaries.py

0 commit comments

Comments
 (0)