Refresh GitHub workflows (#337)

* Add .idea in .gitignore

* Refresh Github workflows

* Allow very complex type usage in ntex-rt
This commit is contained in:
Pavlos-Petros Tournaris 2024-04-07 20:42:16 +03:00 committed by GitHub
parent 0b73ae8fa8
commit a858394855
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 79 deletions

View file

@ -7,16 +7,12 @@ jobs:
name: Clippy name: Clippy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: stable toolchain: stable
components: clippy components: clippy
override: true - run: cargo clippy --all-features
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
fmt: fmt:
name: Rustfmt name: Rustfmt
@ -26,13 +22,10 @@ jobs:
rust: rust:
- stable - stable
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
profile: minimal
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
override: true components: rustfmt
- uses: actions-rs/cargo@v1 rustflags: --profile minimal
with: - run: cargo fmt --all -- --check
command: fmt
args: --all -- --check

View file

@ -13,19 +13,15 @@ jobs:
with: with:
tool-cache: true tool-cache: true
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install Rust - name: Install Rust
run: rustup update nightly run: rustup update nightly
- name: Install cargo-llvm-cov - name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.0.1
- name: Clean coverage results - name: Clean coverage results
run: cargo llvm-cov clean --workspace run: cargo llvm-cov clean --workspace
@ -40,7 +36,7 @@ jobs:
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std" run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std"
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v4
with: with:
files: lcov.info files: lcov.info
fail_ci_if_error: true fail_ci_if_error: true

View file

@ -21,38 +21,32 @@ jobs:
with: with:
tool-cache: true tool-cache: true
- uses: actions/checkout@master - uses: actions/checkout@v4
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu
profile: minimal
override: true
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1
timeout-minutes: 40 timeout-minutes: 40
with: run: cargo test --all --all-features --no-fail-fast -- --nocapture
command: test
args: --all --all-features --no-fail-fast -- --nocapture
- name: Run async-std tests - name: Run async-std tests
timeout-minutes: 40 timeout-minutes: 40

View file

@ -15,37 +15,30 @@ jobs:
runs-on: macOS-latest runs-on: macOS-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v4
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: ${{ matrix.version }}-x86_64-apple-darwin toolchain: ${{ matrix.version }}-x86_64-apple-darwin
profile: minimal
override: true
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: cargo test --all --all-features --no-fail-fast -- --nocapture
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |

View file

@ -18,19 +18,15 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v4
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: ${{ matrix.version }}-x86_64-pc-windows-msvc toolchain: ${{ matrix.version }}-x86_64-pc-windows-msvc
profile: minimal
override: true
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache vcpkg - name: Cache vcpkg
uses: actions/cache@v4 uses: actions/cache@v4
@ -66,24 +62,22 @@ jobs:
Get-ChildItem C:\vcpkg\installed\x64-windows\lib Get-ChildItem C:\vcpkg\installed\x64-windows\lib
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: |
with: cargo test --lib --all-features --no-fail-fast -- --nocapture \
command: test --skip test_panic_in_worker \
args: --lib --all-features --no-fail-fast -- --nocapture --skip test_connection_force_close \
--skip test_panic_in_worker --skip test_connection_server_close \
--skip test_connection_force_close --skip test_freeze \
--skip test_connection_server_close --skip test_simple \
--skip test_freeze --skip test_test_methods \
--skip test_simple --skip test_connection_wait_queue_force_close \
--skip test_test_methods --skip test_params \
--skip test_connection_wait_queue_force_close --skip test_body \
--skip test_params --skip test_form \
--skip test_body --skip test_json \
--skip test_form --skip test_connection_reuse \
--skip test_json --skip test_connection_wait_queue \
--skip test_connection_reuse --skip test_no_decompress \
--skip test_connection_wait_queue --skip test_connection_reuse_h2 \
--skip test_no_decompress --skip test_h2_tcp \
--skip test_connection_reuse_h2 --skip test_timer
--skip test_h2_tcp
--skip test_timer

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ cobertura.xml
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk
.idea/

View file

@ -140,6 +140,7 @@ mod glommio {
/// Blocking operation completion future. It resolves with results /// Blocking operation completion future. It resolves with results
/// of blocking function execution. /// of blocking function execution.
#[allow(clippy::type_complexity)]
pub struct JoinHandle<T> { pub struct JoinHandle<T> {
fut: fut:
Either<task::JoinHandle<T>, Pin<Box<dyn Future<Output = Result<T, Canceled>>>>>, Either<task::JoinHandle<T>, Pin<Box<dyn Future<Output = Result<T, Canceled>>>>>,