Skip to content

Commit

Permalink
Merge branch 'main' into waylon/release_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJepsen authored May 26, 2023
2 parents c01caf7 + 87017ce commit a855a86
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 64 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: lint

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
fmt:
name: fmt
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt

- name: cargo fmt
run: cargo fmt --all -- --check

clippy:
name: clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy

- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
63 changes: 0 additions & 63 deletions .github/workflows/rust.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: test

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
name: test
runs-on: ubuntu-latest
env:
ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/Lc7oIGYeL_QvInzI0Wiu_pOZZDEKBrdf
steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: test
run: cargo test --all --all-features --exclude bindings

codecov:
name: codecov
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: codecov
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --exclude bindings
2 changes: 1 addition & 1 deletion src/simulate/uniswap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub fn run(
uniswap_pair.decode_output("getReserves", uniswap_reserves_after)?;
let x_after_swap = U256::from(uniswap_reserves_after.0);
let y_after_swap = U256::from(uniswap_reserves_after.1);
if size.sell_asset == true {
if size.sell_asset {
swap_output = y_before_swap - y_after_swap;
arbitrage::swap_liquid_expchange(
arbitrageur,
Expand Down

0 comments on commit a855a86

Please # to comment.