Skip to content

Commit

Permalink
✨ Feat: implement CoinGecko API integration for dynamic coin mappings (
Browse files Browse the repository at this point in the history
…#49)

* ✨ implement CoinGecko API integration for dynamic coin mappings

* ♻️ add benchmarking workflow and implement CoinGecko benchmarks

* fix: ensure proper formatting in Cargo.toml for benchmarks section

* Update src/constants.rs

Co-authored-by: 0xevolve <Artevolve@yahoo.com>

* ✨ add CoinGecko API integration for fetching coin mappings

* ♻️ rename cargo-lint job to cargo-bench and adjust CoinGecko API pagination

* ♻️ refactor CoinGecko benchmarks to use mock data and implement retry logic for API initialization

---------

Co-authored-by: 0xevolve <Artevolve@yahoo.com>
  • Loading branch information
yezz123 and EvolveArt authored Dec 14, 2024
1 parent 7e485df commit 5750f1e
Show file tree
Hide file tree
Showing 11 changed files with 475 additions and 26 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Task - Benchmarks

on:
workflow_dispatch:
workflow_call:

jobs:
cargo-bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show

- uses: Swatinem/rust-cache@v2
- name: Benchmarks
run: |
cargo bench
5 changes: 5 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ jobs:
name: Run Cargo linters
uses: ./.github/workflows/linters-cargo.yml
needs: rust_build

bench:
name: Run benchmarks
uses: ./.github/workflows/bench.yml
needs: rust_build
229 changes: 228 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ uuid = { version = "1.4", features = ["fast-rng", "v4", "serde"] }

[dev-dependencies]
rstest = "0.18.2"
criterion = { version = "0.5", features = ["async_tokio"] }

[[bench]]
name = "coingecko_benchmarks"
harness = false
Loading

0 comments on commit 5750f1e

Please sign in to comment.