-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove max fee from `to_starknet_transaction` * remove Error suffix * rename + add `EthereumBlockStore` * clean provider * fix tests * fix deno CI * update rust github action * update CI * update CI * comments + adjust hive test timings * fix naming to `block_hash_or_number`
- Loading branch information
Showing
20 changed files
with
311 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: deno test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
formatting: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: indexer | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: vx.x.x | ||
- name: Run formatting | ||
run: deno fmt --check indexer/ | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
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 | ||
- name: Generate Coverage Report on target branch | ||
run: deno coverage cov_profile --html | ||
- name: Install bc | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y bc | ||
- name: Extract coverage percentage from HTML for the target branch | ||
run: | | ||
cat cov_profile/html/index.html | ||
coverage_percentage=$(grep -A 3 "<div class='fl pad1y space-right2'>" cov_profile/html/index.html | grep "<span class='strong'>" | awk -F'[<>]' '{gsub("%","",$3); print $3}') | ||
echo $coverage_percentage > curr_coverage_percentage.txt | ||
# Checkout base branch and run tests | ||
- uses: actions/checkout@v4 | ||
with: | ||
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 | ||
- 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 | ||
run: | | ||
coverage_percentage_main=$(grep -A 3 "<div class='fl pad1y space-right2'>" cov_profile_main/html/index.html | grep "<span class='strong'>" | awk -F'[<>]' '{gsub("%","",$3); print $3}') | ||
echo $coverage_percentage_main > coverage_percentage_main.txt | ||
- name: Compare coverage percentage | ||
run: | | ||
previous_coverage=$(awk '{print $2}' coverage_percentage_main.txt) | ||
echo "Previous coverage percentage was $previous_coverage%" | ||
current_coverage=$(awk '{print $2}' curr_coverage_percentage.txt) | ||
echo "Current coverage percentage is $current_coverage%" | ||
change=$(echo "$previous_coverage - $current_coverage" | bc) | ||
echo "Coverage change is $change%" | ||
if (( $(echo "$change > 5.0" | bc -l) )); then | ||
echo "Coverage dropped by more than 5%!" | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 4 additions & 57 deletions
61
.github/workflows/test.yml → .github/workflows/rust_test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.