CI, sonic: Replace backend-arm64 docker build with native GHA runner, disable sonic for arm64 (#1794)

* CI: Replace docker amd64 with native runner, switch Docker test arch to amd64

* tests: Remove spaces and new lines from test JSON timestamp fields

* builds: Disable sonic for arm64 due to OKX unmarshal issue

* nits: Improve Dockerfile comment and fix build tag
This commit is contained in:
Adrian Gallagher
2025-02-24 12:38:12 +11:00
committed by GitHub
parent 636adb8822
commit 744ee7c099
13 changed files with 48 additions and 56 deletions

View File

@@ -2658,7 +2658,7 @@ func TestOptionsUnderlyingTradesPushData(t *testing.T) {
}
}
const optionsUnderlyingPricePushDataJSON = `{ "time": 1630576356, "channel": "options.ul_price", "event": "update", "result": { "underlying": "BTC_USDT", "price": 49653.24,"time": 1639143988,"time_ms": 1639143988931 }}`
const optionsUnderlyingPricePushDataJSON = `{ "time": 1630576356, "channel": "options.ul_price", "event": "update", "result": { "underlying": "BTC_USDT", "price": 49653.24,"time": 1639143988,"time_ms": 1639143988931}}`
func TestOptionsUnderlyingPricePushData(t *testing.T) {
t.Parallel()
@@ -2667,7 +2667,7 @@ func TestOptionsUnderlyingPricePushData(t *testing.T) {
}
}
const optionsMarkPricePushDataJSON = `{ "time": 1630576356, "channel": "options.mark_price", "event": "update", "result": { "contract": "BTC_USDT-20211231-59800-P", "price": 11021.27, "time": 1639143401, "time_ms": 1639143401676 }}`
const optionsMarkPricePushDataJSON = `{ "time": 1630576356, "channel": "options.mark_price", "event": "update", "result": { "contract": "BTC_USDT-20211231-59800-P", "price": 11021.27, "time": 1639143401, "time_ms": 1639143401676}}`
func TestOptionsMarkPricePushData(t *testing.T) {
t.Parallel()
@@ -2676,7 +2676,7 @@ func TestOptionsMarkPricePushData(t *testing.T) {
}
}
const optionsSettlementsPushDataJSON = `{ "time": 1630576356, "channel": "options.settlements", "event": "update", "result": { "contract": "BTC_USDT-20211130-55000-P", "orderbook_id": 2, "position_size": 1, "profit": 0.5, "settle_price": 70000, "strike_price": 65000, "tag": "WEEK", "trade_id": 1, "trade_size": 1, "underlying": "BTC_USDT", "time": 1639051907, "time_ms": 1639051907000 }}`
const optionsSettlementsPushDataJSON = `{ "time": 1630576356, "channel": "options.settlements", "event": "update", "result": { "contract": "BTC_USDT-20211130-55000-P", "orderbook_id": 2, "position_size": 1, "profit": 0.5, "settle_price": 70000, "strike_price": 65000, "tag": "WEEK", "trade_id": 1, "trade_size": 1, "underlying": "BTC_USDT", "time": 1639051907, "time_ms": 1639051907000}}`
func TestSettlementsPushData(t *testing.T) {
t.Parallel()
@@ -2685,7 +2685,7 @@ func TestSettlementsPushData(t *testing.T) {
}
}
const optionsContractPushDataJSON = `{"time": 1630576356, "channel": "options.contracts", "event": "update", "result": { "contract": "BTC_USDT-20211130-50000-P", "create_time": 1637917026, "expiration_time": 1638230400, "init_margin_high": 0.15, "init_margin_low": 0.1, "is_call": false, "maint_margin_base": 0.075, "maker_fee_rate": 0.0004, "mark_price_round": 0.1, "min_balance_short": 0.5, "min_order_margin": 0.1, "multiplier": 0.0001, "order_price_deviate": 0, "order_price_round": 0.1, "order_size_max": 1, "order_size_min": 10, "orders_limit": 100000, "ref_discount_rate": 0.1, "ref_rebate_rate": 0, "strike_price": 50000, "tag": "WEEK", "taker_fee_rate": 0.0004, "underlying": "BTC_USDT", "time": 1639051907, "time_ms": 1639051907000 }}`
const optionsContractPushDataJSON = `{"time": 1630576356, "channel": "options.contracts", "event": "update", "result": { "contract": "BTC_USDT-20211130-50000-P", "create_time": 1637917026, "expiration_time": 1638230400, "init_margin_high": 0.15, "init_margin_low": 0.1, "is_call": false, "maint_margin_base": 0.075, "maker_fee_rate": 0.0004, "mark_price_round": 0.1, "min_balance_short": 0.5, "min_order_margin": 0.1, "multiplier": 0.0001, "order_price_deviate": 0, "order_price_round": 0.1, "order_size_max": 1, "order_size_min": 10, "orders_limit": 100000, "ref_discount_rate": 0.1, "ref_rebate_rate": 0, "strike_price": 50000, "tag": "WEEK", "taker_fee_rate": 0.0004, "underlying": "BTC_USDT", "time": 1639051907, "time_ms": 1639051907000}}`
func TestOptionsContractPushData(t *testing.T) {
t.Parallel()
@@ -2745,7 +2745,7 @@ func TestOptionUserTradesPushData(t *testing.T) {
}
}
const optionsLiquidatesPushDataJSON = `{ "channel": "options.liquidates", "event": "update", "time": 1630654851, "result": [ { "user": "1xxxx", "init_margin": 1190, "maint_margin": 1042.5, "order_margin": 0, "time": 1639051907, "time_ms": 1639051907000 } ]}`
const optionsLiquidatesPushDataJSON = `{ "channel": "options.liquidates", "event": "update", "time": 1630654851, "result": [ { "user": "1xxxx", "init_margin": 1190, "maint_margin": 1042.5, "order_margin": 0, "time": 1639051907, "time_ms": 1639051907000} ]}`
func TestOptionsLiquidatesPushData(t *testing.T) {
t.Parallel()
@@ -2781,7 +2781,7 @@ func TestOptionsBalancePushData(t *testing.T) {
}
}
const optionsPositionPushDataJSON = `{"time": 1630654851, "channel": "options.positions", "event": "update", "error": null, "result": [ { "entry_price": 0, "realised_pnl": -13.028, "size": 0, "contract": "BTC_USDT-20211130-65000-C", "user": "9010", "time": 1639051907, "time_ms": 1639051907000 } ]}`
const optionsPositionPushDataJSON = `{"time": 1630654851, "channel": "options.positions", "event": "update", "error": null, "result": [ { "entry_price": 0, "realised_pnl": -13.028, "size": 0, "contract": "BTC_USDT-20211130-65000-C", "user": "9010", "time": 1639051907, "time_ms": 1639051907000} ]}`
func TestOptionsPositionPushData(t *testing.T) {
t.Parallel()