run both sets of tests on linux

This commit is contained in:
Rob Ede 2021-09-02 01:09:33 +01:00
parent 5db9ba69a8
commit fb6e7f0eec
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 9 additions and 6 deletions

View File

@ -19,4 +19,5 @@ ci-test-rt = " hack --feature-powerset --exclude-features io-uring test --pac
ci-test-server = "hack --feature-powerset --exclude-features io-uring test --package=actix-server --lib --tests --no-fail-fast -- --nocapture"
# test with io-uring feature
ci-test-linux = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture"
ci-test-rt-linux = " hack --feature-powerset test --package=actix-rt --lib --tests --no-fail-fast -- --nocapture"
ci-test-server-linux = "hack --feature-powerset test --package=actix-server --lib --tests --no-fail-fast -- --nocapture"

View File

@ -112,8 +112,10 @@ jobs:
cargo ci-test-server
- name: tests
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-test-linux }
run: |
cargo ci-test
cargo ci-test-rt-linux
cargo ci-test-server-linux
- name: Generate coverage file
if: >

View File

@ -95,7 +95,7 @@ impl Arbiter {
///
/// # Panics
/// Panics if a [System] is not registered on the current thread.
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
#[cfg(not(all(target_os = "linux", feature = "io-uring")))]
#[allow(clippy::new_without_default)]
pub fn new() -> Arbiter {
Self::with_tokio_rt(|| {
@ -107,7 +107,7 @@ impl Arbiter {
/// Spawn a new Arbiter using the [Tokio Runtime](tokio-runtime) returned from a closure.
///
/// [tokio-runtime]: tokio::runtime::Runtime
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
#[cfg(not(all(target_os = "linux", feature = "io-uring")))]
#[doc(hidden)]
pub fn with_tokio_rt<F>(runtime_factory: F) -> Arbiter
where

View File

@ -288,7 +288,7 @@ impl ServerWorker {
Arbiter::new()
};
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
#[cfg(not(all(target_os = "linux", feature = "io-uring")))]
let arbiter = Arbiter::with_tokio_rt(move || {
tokio::runtime::Builder::new_current_thread()
.enable_all()