-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync e2e tests #221
Sync e2e tests #221
Changes from 14 commits
aa2d9e8
0bbbd99
45aae02
3a34931
38a9b6b
d638a63
ab7d81b
7b4ffe3
e346bab
83ce6e3
50a2ed6
906283e
b92e70c
6451e4d
68b38bd
4ded593
26d8ff4
c50a90e
1c189d8
334300f
d896ebe
1ec2a1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,20 +11,46 @@ jobs: | |
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Swatinem/rust-cache@v2 # use a different cache key as coverae uses custom rustc args | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
shared-key: "cache" | ||
save-if: false | ||
toolchain: 1.78 | ||
- name: Setup build deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler | ||
- uses: rui314/setup-mold@v1 | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Coverage | ||
run: cargo llvm-cov --codecov --output-path codecov.json | ||
- name: Upload coverage to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
|
||
- uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
- name: Launch Anvil | ||
run: anvil --fork-url $ANVIL_FORK_URL --fork-block-number $ANVIL_BLOCK_NUMBER & | ||
env: | ||
ANVIL_FORK_URL: "https://eth.merkle.io" | ||
ANVIL_BLOCK_NUMBER: 20395662 | ||
- name: Wait for Anvil to be ready | ||
run: | | ||
while ! nc -z localhost 8545; do | ||
sleep 1 | ||
done | ||
|
||
- name: Build and run tests | ||
run: | | ||
source <(cargo llvm-cov show-env --export-prefix) | ||
cargo build --bin deoxys --profile dev | ||
export COVERAGE_BIN=$(realpath target/debug/deoxys) | ||
rm -f target/madara-* lcov.info | ||
cargo test --profile dev | ||
|
||
- name: Generate coverage info | ||
run: | | ||
source <(cargo llvm-cov show-env --export-prefix) | ||
cargo llvm-cov report --cobertura --output-path coverage.cobertura.xml | ||
|
||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
with: | ||
files: codecov.json | ||
fail_ci_if_error: false | ||
filename: coverage.cobertura.xml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,12 @@ jobs: | |
uses: ./.github/workflows/linters-cargo.yml | ||
needs: rust_check | ||
|
||
rust_test: | ||
name: Run Cargo tests | ||
uses: ./.github/workflows/rust-test.yml | ||
needs: rust_check | ||
# rust_test: | ||
# name: Run Cargo tests | ||
# uses: ./.github/workflows/rust-test.yml | ||
# needs: rust_check | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's delete if not needed |
||
|
||
coverage: | ||
name: Run Coverage | ||
uses: ./.github/workflows/coverage.yml | ||
needs: changelog |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
uses: ./.github/workflows/linters-cargo.yml | ||
needs: rust_check | ||
|
||
rust_test: | ||
name: Run Cargo tests | ||
uses: ./.github/workflows/rust-test.yml | ||
needs: rust_check | ||
Comment on lines
-23
to
-26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
# rust_test: | ||
# name: Run Cargo tests | ||
# uses: ./.github/workflows/rust-test.yml | ||
# needs: rust_check |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/// Parameters used to config telemetry. | ||
/// Parameters used to config block production. | ||
#[derive(Clone, Debug, clap::Parser)] | ||
pub struct BlockProductionParams { | ||
/// Disable the block production service. | ||
/// The block production service is only enabled with the authority (sequencer) mode. | ||
#[arg(long, alias = "no-disabled")] | ||
#[arg(long, alias = "no-block-production")] | ||
pub block_production_disabled: bool, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "dc-e2e-tests" | ||
authors.workspace = true | ||
homepage.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
license.workspace = true | ||
|
||
[dependencies] | ||
|
||
anyhow.workspace = true | ||
env_logger.workspace = true | ||
lazy_static.workspace = true | ||
log.workspace = true | ||
reqwest.workspace = true | ||
rstest.workspace = true | ||
starknet-core.workspace = true | ||
starknet-providers.workspace = true | ||
tempfile.workspace = true | ||
tokio = { workspace = true, features = ["rt", "macros"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference between this and
rust-test.yml
, do we need both?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it