diff --git a/.github/workflows/gas_reports.yml b/.github/workflows/gas_reports.yml index 19c0a64ab..07ecf9f27 100644 --- a/.github/workflows/gas_reports.yml +++ b/.github/workflows/gas_reports.yml @@ -34,7 +34,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} continue-on-error: true run: | - result=$(python tmp.py 2>&1) + result=$(python scripts/compare_snapshot.py 2>&1) status=$(echo "$result" | tail -n 1 | awk -F ':' '{print $1}') echo "$result" >> "$GITHUB_STEP_SUMMARY" echo "status=$status" >> "$GITHUB_OUTPUT" diff --git a/scripts/compare_snapshot.py b/scripts/compare_snapshot.py index f76cf8915..c4ae2efb1 100644 --- a/scripts/compare_snapshot.py +++ b/scripts/compare_snapshot.py @@ -143,13 +143,8 @@ def main(): current_snapshots = get_current_gas_snapshot() improvements, worsened = compare_snapshots(current_snapshots, previous_snapshot) cur_gas, prev_gas = total_gas_used(current_snapshots, previous_snapshot) - logger.info("****BETTER****") - for elem in improvements: - logger.info(elem) - - logger.info("****WORST****") - for elem in worsened: - logger.info(elem) + logger.info("\n".join(["****BETTER****"] + improvements)) + logger.info("\n".join(["****WORST****"] + worsened)) logger.info(f"Overall gas change: {(cur_gas - prev_gas) * 100 / prev_gas:.2%}") if worsened: diff --git a/tmp.py b/tmp.py deleted file mode 100644 index d6a71bb5d..000000000 --- a/tmp.py +++ /dev/null @@ -1,7 +0,0 @@ -import logging - -logging.basicConfig(level=logging.INFO) -logger = logging.getLogger(__name__) - -logger.info("before error") -# logger.error("error here")