From 2fbf83363028179fe8d3908b5d9911d8595163b1 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Mon, 25 Apr 2022 19:18:27 -0400 Subject: add integration feature to github tests --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1368d1bc..d87d4a3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --workspace + args: --workspace --features integration strategy: matrix: -- cgit v1.2.3-70-g09d2 From cb0440be85338b2669a8341dee2861ea53da7ef7 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Wed, 27 Apr 2022 00:42:18 -0400 Subject: use env var for integration test log level --- .github/workflows/build.yml | 3 +++ helix-term/src/application.rs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d87d4a3b..50829caa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,9 @@ jobs: test: name: Test Suite runs-on: ${{ matrix.os }} + env: + RUST_BACKTRACE: 1 + HELIX_LOG_LEVEL: info steps: - name: Checkout sources uses: actions/checkout@v3 diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 886b531b..f3aa955f 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -61,6 +61,10 @@ pub struct Application { #[cfg(feature = "integration")] fn setup_integration_logging() { + let level = std::env::var("HELIX_LOG_LEVEL") + .map(|lvl| lvl.parse().unwrap()) + .unwrap_or(log::LevelFilter::Info); + // Separate file config so we can include year, month and day in file logs let _ = fern::Dispatch::new() .format(|out, message, record| { @@ -72,7 +76,7 @@ fn setup_integration_logging() { message )) }) - .level(log::LevelFilter::Debug) + .level(level) .chain(std::io::stdout()) .apply(); } -- cgit v1.2.3-70-g09d2 From 28e94fb2613fbedeef56c1bc6e21830277bb35bb Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Wed, 27 Apr 2022 08:44:20 -0400 Subject: need the full languages config for integration tests --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50829caa..9d0383a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,9 +53,6 @@ jobs: - uses: Swatinem/rust-cache@v1 - - name: Copy minimal languages config - run: cp .github/workflows/languages.toml ./languages.toml - - name: Cache test tree-sitter grammar uses: actions/cache@v3 with: -- cgit v1.2.3-70-g09d2 From 086b63ab1b5f004400721ef876b6f1441783f104 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Thu, 2 Jun 2022 00:13:08 -0400 Subject: add integration-test cargo alias --- .cargo/config | 1 + .github/workflows/build.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.cargo/config b/.cargo/config index 35049cbc..5d615566 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,2 +1,3 @@ [alias] xtask = "run --package xtask --" +integration-test = "test --features integration --workspace --test integration" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d0383a7..b24cdb8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,12 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --workspace --features integration + args: --workspace + + - name: Run cargo integration-test + uses: actions-rs/cargo@v1 + with: + command: integration-test strategy: matrix: -- cgit v1.2.3-70-g09d2