Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Add Test Coverage for transform Function in the Indexer (#1251)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
eugypalu authored Jul 3, 2024
1 parent 5db4e63 commit bd6830b
Show file tree
Hide file tree
Showing 6 changed files with 55,962 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deno_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
deno-version: v1.x
# Checkout target branch and run tests
- name: Run Tests with Coverage on target branch
run: KAKAROT_ADDRESS=0x1 deno test --allow-env --coverage=cov_profile
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
- name: Generate Coverage Report on target branch
run: deno coverage cov_profile --html
- name: Install bc
Expand All @@ -47,7 +47,7 @@ jobs:
ref: ${{ github.base_ref }}
clean: false
- name: Run Tests with Coverage on base branch
run: KAKAROT_ADDRESS=0x1 deno test --allow-env --coverage=cov_profile_main
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
- name: Generate HTML report from for the base branch
run: deno coverage cov_profile_main --html
- name: Extract coverage percentage from HTML for the base branch
Expand All @@ -65,4 +65,4 @@ jobs:
if (( $(echo "$change > 5.0" | bc -l) )); then
echo "Coverage dropped by more than 5%!"
exit 1
fi
fi
Loading

0 comments on commit bd6830b

Please sign in to comment.