From 603abd7fa8d658106ce1cb05ef810489a54ba59c Mon Sep 17 00:00:00 2001 From: Petar Penovic Date: Fri, 1 Sep 2023 09:45:24 +0200 Subject: [PATCH] ci(WIP): test devnet-rs --- .github/workflows/_test.yml | 10 ++++++---- __tests__/fixtures.ts | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index dfb9fffbb..1fd18c37f 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -26,14 +26,16 @@ jobs: # TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822 services: devnet: - # image: ${{ inputs.use-rpc-devnet && 'shardlabs/starknet-devnet:0.6.0a0-seed0' || inputs.use-seq-devnet && 'shardlabs/starknet-devnet:0.6.0a0-seed0' || '' }} - image: ${{ (inputs.use-rpc-devnet || inputs.use-seq-devnet) && 'shardlabs/starknet-devnet:0.6.0a0-seed0' || '' }} - # image: shardlabs/starknet-devnet:0.6.0a0-seed0 + image: ${{ inputs.use-rpc-devnet && 'shardlabs/starknet-devnet-rs:966221808176c3298cc47ca99e93650e77a6a323-seed0' || inputs.use-seq-devnet && 'shardlabs/starknet-devnet:0.5.5-seed0' || '' }} + # image: ${{ (inputs.use-rpc-devnet || inputs.use-seq-devnet) && 'shardlabs/starknet-devnet:0.5.5-seed0' || '' }} + # image: shardlabs/starknet-devnet-rs:966221808176c3298cc47ca99e93650e77a6a323-seed0 ports: - 5050:5050 # TODO - temporary conditional, remove if/when devnet RPC support is restored - if: ${{ (!inputs.use-rpc-devnet) }} + # if: ${{ (!inputs.use-rpc-devnet) }} + + # if: ${{ (inputs.use-rpc-devnet) }} env: TEST_PROVIDER_BASE_URL: ${{ secrets.TEST_PROVIDER_BASE_URL }} diff --git a/__tests__/fixtures.ts b/__tests__/fixtures.ts index 876c4ca99..c5e54eb40 100644 --- a/__tests__/fixtures.ts +++ b/__tests__/fixtures.ts @@ -48,9 +48,9 @@ export const compiledC1v2Casm = readContractSierraCasm('cairo/helloCairo2/compil /* Default test config based on run `starknet-devnet --seed 0` */ const DEFAULT_TEST_PROVIDER_SEQUENCER_URL = 'http://127.0.0.1:5050/'; -const DEFAULT_TEST_ACCOUNT_ADDRESS = - '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a'; -const DEFAULT_TEST_ACCOUNT_PRIVATE_KEY = '0xe3e70682c2094cac629f6fbed82c07cd'; +// const DEFAULT_TEST_ACCOUNT_ADDRESS = +// '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a'; +// const DEFAULT_TEST_ACCOUNT_PRIVATE_KEY = '0xe3e70682c2094cac629f6fbed82c07cd'; /* User defined config or default one */ const BASE_URL = process.env.TEST_PROVIDER_BASE_URL || DEFAULT_TEST_PROVIDER_SEQUENCER_URL; @@ -103,8 +103,18 @@ export const getTestAccount = (provider: ProviderInterface) => { throw new Error('TEST_ACCOUNT_ADDRESS is not set'); } } else { - testAccountAddress = DEFAULT_TEST_ACCOUNT_ADDRESS; - testAccountPrivateKey = DEFAULT_TEST_ACCOUNT_PRIVATE_KEY; + // testAccountAddress = DEFAULT_TEST_ACCOUNT_ADDRESS; + // testAccountPrivateKey = DEFAULT_TEST_ACCOUNT_PRIVATE_KEY; + + [testAccountAddress, testAccountPrivateKey] = IS_RPC + ? [ + '0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691', + '0x71d7bb07b9a64f6f78ac4c816aff4da9', + ] + : [ + '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a', + '0xe3e70682c2094cac629f6fbed82c07cd', + ]; } const cairoVersion = (process.env.ACCOUNT_CAIRO_VERSION as CairoVersion) || '0';