Store logs from failed CI as artifacts (#508)
This commit is contained in:
parent
0730e05a6f
commit
a58d3fb63c
|
@ -72,6 +72,11 @@ jobs:
|
|||
with:
|
||||
command: test
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: integration-test-artifacts
|
||||
path: tests/.tmp*
|
||||
|
||||
lints:
|
||||
name: Rust lints
|
||||
|
|
|
@ -35,6 +35,11 @@ jobs:
|
|||
cargo test --no-default-features --features libp2p
|
||||
mkdir /tmp/cov;
|
||||
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/cov/tests.lcov;
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: integration-test-artifacts
|
||||
path: tests/.tmp*
|
||||
- uses: codecov/codecov-action@v3
|
||||
with:
|
||||
directory: /tmp/cov/
|
||||
|
|
|
@ -15,3 +15,6 @@ store.*
|
|||
sim_config.json
|
||||
*.txt
|
||||
.env
|
||||
|
||||
# Integration test temp dirs
|
||||
tests/.tmp*
|
||||
|
|
|
@ -63,7 +63,11 @@ impl NomosNode {
|
|||
pub async fn spawn(mut config: Config) -> Self {
|
||||
// Waku stores the messages in a db file in the current dir, we need a different
|
||||
// directory for each node to avoid conflicts
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
//
|
||||
// NOTE: It's easier to use the current location instead of OS-default tempfile location
|
||||
// because Github Actions can easily access files in the current location using wildcard
|
||||
// to upload them as artifacts.
|
||||
let dir = tempfile::TempDir::new_in(std::env::current_dir().unwrap()).unwrap();
|
||||
let mut file = NamedTempFile::new().unwrap();
|
||||
let config_path = file.path().to_owned();
|
||||
|
||||
|
|
Loading…
Reference in New Issue