Skip to content

Commit

Permalink
chore(CI): upload faucet log during CI
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi authored and RolandSherwin committed Apr 24, 2024
1 parent 0415cf7 commit 362c9a3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
NODE_DATA_PATH: /home/runner/.local/share/safe/node
BOOTSTRAP_NODE_DATA_PATH: /home/runner/.local/share/safe/bootstrap_node
RESTART_TEST_NODE_DATA_PATH: /home/runner/.local/share/safe/restart_node
FAUCET_LOG_PATH: /home/runner/.local/share/safe/test_faucet/logs

jobs:
memory-check:
Expand Down Expand Up @@ -105,6 +106,19 @@ jobs:
SN_LOG: "all"
timeout-minutes: 15

- name: Move faucet log to the working folder
run: |
echo "SAFE_DATA_PATH has: "
ls -l $SAFE_DATA_PATH
echo "test_faucet foder has: "
ls -l $SAFE_DATA_PATH/test_faucet
echo "logs folder has: "
ls -l $SAFE_DATA_PATH/test_faucet/logs
mv $FAUCET_LOG_PATH/faucet.log ./faucet_log.log
continue-on-error: true
if: always()
timeout-minutes: 1

- name: Download 95mb file to be uploaded with the safe client
shell: bash
run: wget https://sn-node.s3.eu-west-2.amazonaws.com/the-test-data.zip
Expand Down Expand Up @@ -397,3 +411,11 @@ jobs:
path: initial_balance_from_faucet.txt
continue-on-error: true
if: always()

- name: Upload faucet log
uses: actions/upload-artifact@main
with:
name: memory_check_faucet_log
path: faucet_log.log
continue-on-error: true
if: always()
10 changes: 8 additions & 2 deletions sn_cli/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ async fn main() -> Result<()> {
// Log the full command that was run
info!("\"{}\"", std::env::args().collect::<Vec<_>>().join(" "));

debug!("Built with git version: {}", sn_build_info::git_info());
println!("Built with git version: {}", sn_build_info::git_info());
debug!(
"safe client built with git version: {}",
sn_build_info::git_info()
);
println!(
"safe client built with git version: {}",
sn_build_info::git_info()
);

let client_data_dir_path = get_client_data_dir_path()?;
// Perform actions that do not require us connecting to the network and return early
Expand Down
9 changes: 8 additions & 1 deletion sn_faucet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ async fn main() -> Result<()> {
log_builder.output_dest(opt.log_output_dest);
let _log_handles = log_builder.initialize()?;

debug!("Built with git version: {}", sn_build_info::git_info());
debug!(
"faucet built with git version: {}",
sn_build_info::git_info()
);
println!(
"faucet built with git version: {}",
sn_build_info::git_info()
);
info!("Instantiating a SAFE Test Faucet...");

let secret_key = bls::SecretKey::random();
Expand Down
5 changes: 4 additions & 1 deletion sn_node/src/bin/safenode/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ fn main() -> Result<()> {
env!("CARGO_PKG_VERSION")
);
info!("\n{}\n{}", msg, "=".repeat(msg.len()));
debug!("Built with git version: {}", sn_build_info::git_info());
debug!(
"safenode built with git version: {}",
sn_build_info::git_info()
);

info!("Node started with initial_peers {bootstrap_peers:?}");

Expand Down

0 comments on commit 362c9a3

Please sign in to comment.