Skip to content

Commit

Permalink
Added more tests + rework to library + binary (#6)
Browse files Browse the repository at this point in the history
* Cleanup + Added valid trait for all contract actions

* Reworked challenger to trait + implementation, still need tests & more debug info

* Updated tasks termination

* Updated trait for challenger

* Rework app to bin + library

* Added challenger logic tests + Added automated github action tests
  • Loading branch information
konstantinzolotarev authored Oct 19, 2023
1 parent 775892b commit 2088301
Show file tree
Hide file tree
Showing 11 changed files with 1,218 additions and 1,386 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: test

on:
push:
branches:
- main
- master
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo test --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings

clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings

fmt:
name: fmt
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all --check
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
.DS_Store
.vscode
.vscode
.idea
119 changes: 119 additions & 0 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name = "challenger"
version = "0.1.0"
edition = "2021"

[workspace]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.dependencies]
challenger-lib = { path = "challenger" }

[dependencies]
challenger-lib.workspace = true

ethers = "2.0"
tokio = { version = "1", features = ["full"] }
hex-literal = "0.4.1"
Expand All @@ -19,3 +26,4 @@ chrono = "0.4.26"
rpassword = "7.2.0"
lazy_static = "1.4.0"
tokio-util = "0.7.9"
async-trait = "0.1.73"
Loading

0 comments on commit 2088301

Please sign in to comment.