Skip to content

Commit bd6830b

Browse files
authored
Add Test Coverage for transform Function in the Indexer (kkrt-labs#1251)
* feat: transform unit test * feat: transform and transaction test with real data * fix: test non kakarot transactions * fix: log * fix: deno test formatting * fix: transformTransactionsAndEvents * fix: CI with new test * fix: test formatting * fix: CI * fix: CI with test not present on base branch * fix: refactoring test and CI * fix: path test-data * fix: test formatting * fix: test formatting * fix: test refactoring
1 parent 5db4e63 commit bd6830b

6 files changed

Lines changed: 55962 additions & 4 deletions

File tree

.github/workflows/deno_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
deno-version: v1.x
3030
# Checkout target branch and run tests
3131
- name: Run Tests with Coverage on target branch
32-
run: KAKAROT_ADDRESS=0x1 deno test --allow-env --coverage=cov_profile
32+
run: DEFAULT_BLOCK_GAS_LIMIT=7000000 STARKNET_NETWORK=http://0.0.0.0:1010 KAKAROT_ADDRESS=0x11c5faab8a76b3caff6e243b8d13059a7fb723a0ca12bbaadde95fb9e501bda deno test --allow-env --allow-read --coverage=cov_profile
3333
- name: Generate Coverage Report on target branch
3434
run: deno coverage cov_profile --html
3535
- name: Install bc
@@ -47,7 +47,7 @@ jobs:
4747
ref: ${{ github.base_ref }}
4848
clean: false
4949
- name: Run Tests with Coverage on base branch
50-
run: KAKAROT_ADDRESS=0x1 deno test --allow-env --coverage=cov_profile_main
50+
run: DEFAULT_BLOCK_GAS_LIMIT=7000000 STARKNET_NETWORK=http://0.0.0.0:1010 KAKAROT_ADDRESS=0x11c5faab8a76b3caff6e243b8d13059a7fb723a0ca12bbaadde95fb9e501bda deno test --allow-env --allow-read --coverage=cov_profile_main
5151
- name: Generate HTML report from for the base branch
5252
run: deno coverage cov_profile_main --html
5353
- name: Extract coverage percentage from HTML for the base branch
@@ -65,4 +65,4 @@ jobs:
6565
if (( $(echo "$change > 5.0" | bc -l) )); then
6666
echo "Coverage dropped by more than 5%!"
6767
exit 1
68-
fi
68+
fi

0 commit comments

Comments
 (0)